public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/vineet/arc-port-latest] hurd: Evaluate fd before entering the critical section
@ 2020-07-09 16:35 Vineet Gupta
  0 siblings, 0 replies; only message in thread
From: Vineet Gupta @ 2020-07-09 16:35 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d63387d81d575ba8187345d216070595bd58cb2b

commit d63387d81d575ba8187345d216070595bd58cb2b
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Jul 7 22:09:29 2020 +0200

    hurd: Evaluate fd before entering the critical section
    
    * sysdeps/hurd/include/hurd/fd.h (HURD_FD_PORT_USE_CANCEL): Evaluate fd
    before calling _hurd_critical_section_lock.

Diff:
---
 sysdeps/hurd/include/hurd/fd.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sysdeps/hurd/include/hurd/fd.h b/sysdeps/hurd/include/hurd/fd.h
index 3a6cdc7f36..1985b6fbb2 100644
--- a/sysdeps/hurd/include/hurd/fd.h
+++ b/sysdeps/hurd/include/hurd/fd.h
@@ -20,10 +20,11 @@ extern void _hurd_fd_port_use_cleanup (void *arg);
 /* Like HURD_FD_PORT_USE, but cleans fd on cancel.  */
 #define	HURD_FD_PORT_USE_CANCEL(fd, expr)				      \
   ({ error_t __result;							      \
-     void *__crit = _hurd_critical_section_lock ();			      \
      struct _hurd_fd_port_use_data __d;					      \
      io_t port, ctty;							      \
+     void *__crit;							      \
      __d.d = (fd);							      \
+     __crit = _hurd_critical_section_lock ();				      \
      __spin_lock (&__d.d->port.lock);					      \
      if (__d.d->port.port == MACH_PORT_NULL)				      \
        {								      \


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-09 16:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 16:35 [glibc/vineet/arc-port-latest] hurd: Evaluate fd before entering the critical section Vineet Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).