[Glibc-bsd-commits] r5488 - trunk/glibc-ports/fbtl

ps-guest at alioth.debian.org ps-guest at alioth.debian.org
Sat Jul 12 08:05:06 UTC 2014


Author: ps-guest
Date: 2014-07-12 08:05:06 +0000 (Sat, 12 Jul 2014)
New Revision: 5488

Modified:
   trunk/glibc-ports/fbtl/pthread_cond_broadcast.c
Log:
merge from upstream:

commit 8f630cca5c36941db1cb48726016bbed80ec1041
Author: Yang Yingliang <yangyingliang at huawei.com>
Date:   Wed Apr 30 15:46:18 2014 +0530

    Fix lll_unlock twice in pthread_cond_broadcast
    
    lll_unlock() will be called again if it goes to "wake_all" in
    pthread_cond_broadcast(). This may make another thread which is
    waiting for lock in pthread_cond_timedwait() unlock.  So there are
    more than one threads get the lock, it will break the shared data.



Modified: trunk/glibc-ports/fbtl/pthread_cond_broadcast.c
===================================================================
--- trunk/glibc-ports/fbtl/pthread_cond_broadcast.c	2014-07-08 23:01:58 UTC (rev 5487)
+++ trunk/glibc-ports/fbtl/pthread_cond_broadcast.c	2014-07-12 08:05:06 UTC (rev 5488)
@@ -85,6 +85,7 @@
 #endif
 wake_all:
       lll_futex_wake (&cond->__data.__futex, INT_MAX, pshared);
+      return 0;
     }
 
   /* We are done.  */




More information about the Glibc-bsd-commits mailing list