Module Name: src
Committed By: dsl
Date: Sun Dec 16 11:15:21 UTC 2012
Modified Files:
src/libexec/ld.elf_so: rtld.c
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/libexec/ld.elf_so/rtld.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/libexec/ld.elf_so/rtld.c
diff -u src/libexec/ld.elf_so/rtld.c:1.159 src/libexec/ld.elf_so/rtld.c:1.160
--- src/libexec/ld.elf_so/rtld.c:1.159 Mon Oct 1 03:03:46 2012
+++ src/libexec/ld.elf_so/rtld.c Sun Dec 16 11:15:21 2012
@@ -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 @@ _rtld_shared_enter(void)
*/
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)