This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.14-212-g523df51


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  523df511514331a7fa0668b37a917b52f71684af (commit)
      from  2bc174332ba6ddbd1b855dced33889bef56e8ba3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=523df511514331a7fa0668b37a917b52f71684af

commit 523df511514331a7fa0668b37a917b52f71684af
Author: Andreas Schwab <schwab@redhat.com>
Date:   Fri Jun 25 10:41:17 2010 +0200

    Fix setxid race handling exiting threads

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 06d19b9..c44ce2a 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-31  Andreas Schwab  <schwab@redhat.com>
+
+	* allocatestack.c (setxid_mark_thread): Ensure that the exiting
+	thread is woken up.
+
 2011-08-20  David S. Miller  <davem@davemloft.net>
 
 	* Makefile (tst-cleanup0.out): Fix typo in output redirection.
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 9b8b0ce..23d2ce5 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -999,7 +999,16 @@ setxid_mark_thread (struct xid_command *cmdp, struct pthread *t)
 
       /* If the thread is exiting right now, ignore it.  */
       if ((ch & EXITING_BITMASK) != 0)
-	return;
+	{
+	  /* Release the futex if there is no other setxid in
+	     progress.  */
+	  if ((ch & SETXID_BITMASK) == 0)
+	    {
+	      t->setxid_futex = 1;
+	      lll_futex_wake (&t->setxid_futex, 1, LLL_PRIVATE);
+	    }
+	  return;
+	}
     }
   while (atomic_compare_and_exchange_bool_acq (&t->cancelhandling,
 					       ch | SETXID_BITMASK, ch));

-----------------------------------------------------------------------

Summary of changes:
 nptl/ChangeLog       |    5 +++++
 nptl/allocatestack.c |   11 ++++++++++-
 2 files changed, 15 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]