Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Ensure that the LWP private area has a consistent v...
details: https://anonhg.NetBSD.org/src/rev/3156f38b1736
branches: trunk
changeset: 762818:3156f38b1736
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Mar 01 18:53:10 2011 +0000
description:
Ensure that the LWP private area has a consistent value after exec.
diffstat:
sys/kern/kern_exec.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r d9821871a380 -r 3156f38b1736 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c Tue Mar 01 15:33:35 2011 +0000
+++ b/sys/kern/kern_exec.c Tue Mar 01 18:53:10 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.308 2011/02/21 20:23:29 pooka Exp $ */
+/* $NetBSD: kern_exec.c,v 1.309 2011/03/01 18:53:10 joerg Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.308 2011/02/21 20:23:29 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.309 2011/03/01 18:53:10 joerg Exp $");
#include "opt_ktrace.h"
#include "opt_modular.h"
@@ -1075,6 +1075,9 @@
if (pack.ep_esch->es_setregs)
(*pack.ep_esch->es_setregs)(l, &pack, (vaddr_t)stack);
+ /* Provide a consistent LWP private setting */
+ (void)lwp_setprivate(l, NULL);
+
/* map the process's signal trampoline code */
if ((error = exec_sigcode_map(p, pack.ep_esch->es_emul)) != 0) {
DPRINTF(("execve: map sigcode failed %d\n", error));
Home |
Main Index |
Thread Index |
Old Index