]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: fix sigstate locking
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 7 Feb 2015 21:16:19 +0000 (22:16 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 7 Feb 2015 21:16:19 +0000 (22:16 +0100)
It looks like _hurd_thread_sigstate used to return with the sigstate
lock held long ago, but since that's no longer the case, don't unlock
something that isn't locked.

Note that it's unlikely this change fixes anything in practice since
its current implementation (on i386) makes this call a nop.

ChangeLog
hurd/hurd/signal.h

index 5081237ce52db7966d9faa690a9cdf74a8048a04..97849df70686c7fcb051089e4ed70cbfcb74767c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-07  Richard Braun  <rbraun@sceen.net>
+
+       * hurd/hurd/signal.h (_hurd_critical_section_lock): Don't unlock
+       sigstate.
+
 2015-02-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
        * sysdeps/pthread/aio_misc.c [!AIO_PRIO_DELTA_MAX]: Do not check
index 4a744c10ed7f8a7b288d7510979302736ae0bc18..e3322422916291d55475b1b63a6a9fc00b7bcfc6 100644 (file)
@@ -175,9 +175,8 @@ _hurd_critical_section_lock (void)
       /* The thread variable is unset; this must be the first time we've
         asked for it.  In this case, the critical section flag cannot
         possible already be set.  Look up our sigstate structure the slow
-        way; this locks the sigstate lock.  */
+        way.  */
       ss = *location = _hurd_thread_sigstate (__mach_thread_self ());
-      __spin_unlock (&ss->lock);
     }
 
   if (! __spin_try_lock (&ss->critical_section_lock))