Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so You need to pass 0 (not -1) to lwp_park() ...



details:   https://anonhg.NetBSD.org/src/rev/f4257b0c3446
branches:  trunk
changeset: 783345:f4257b0c3446
user:      dsl <dsl%NetBSD.org@localhost>
date:      Sun Dec 16 11:15:21 2012 +0000

description:
You need to pass 0 (not -1) to lwp_park() if you don't also
  want to do an unpark.
Clearly this code path was never tested!
Needs pullup to netbsd-6

diffstat:

 libexec/ld.elf_so/rtld.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 15688c2c9bf8 -r f4257b0c3446 libexec/ld.elf_so/rtld.c
--- a/libexec/ld.elf_so/rtld.c  Sun Dec 16 06:47:39 2012 +0000
+++ b/libexec/ld.elf_so/rtld.c  Sun Dec 16 11:15:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtld.c,v 1.159 2012/10/01 03:03:46 riastradh Exp $      */
+/*     $NetBSD: rtld.c,v 1.160 2012/12/16 11:15:21 dsl Exp $    */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.159 2012/10/01 03:03:46 riastradh Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.160 2012/12/16 11:15:21 dsl Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -1546,7 +1546,7 @@
                 */
                if ((_rtld_mutex & RTLD_EXCLUSIVE_MASK) ||
                    _rtld_waiter_exclusive)
-                       _lwp_park(NULL, -1, __UNVOLATILE(&_rtld_mutex), NULL);
+                       _lwp_park(NULL, 0, __UNVOLATILE(&_rtld_mutex), NULL);
                /* Try to remove us from the waiter list. */
                atomic_cas_uint(&_rtld_waiter_shared, self, 0);
                if (waiter)



Home | Main Index | Thread Index | Old Index