This is the mail archive of the libc-alpha@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]

[COMMITTED] Fix wake-up in sysdeps/nptl/fork.c.


Committed this as obvious.  The futex wake-up needs the address of the
futex variable, not the value.  I've searched glibc bugs for "fork", but
didn't see a bug that seemed to be likely to be related to this.


2015-01-13  Torvald Riegel  <triegel@redhat.com>

        * sysdeps/nptl/fork.c (__libc_fork): Provide address of futex
        variable to lll_futex_wake call, not the value itself.


diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
index 5cffd82..74482b7 100644
--- a/sysdeps/nptl/fork.c
+++ b/sysdeps/nptl/fork.c
@@ -219,7 +219,7 @@ __libc_fork (void)
 
 	  if (atomic_decrement_and_test (&allp->handler->refcntr)
 	      && allp->handler->need_signal)
-	    lll_futex_wake (allp->handler->refcntr, 1, LLL_PRIVATE);
+	    lll_futex_wake (&allp->handler->refcntr, 1, LLL_PRIVATE);
 
 	  allp = allp->next;
 	}



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