From 83990b1879ba05821ca37f92e6028bc614326dde Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 12 Jan 2002 14:20:30 +0000 Subject: [PATCH] Clear the P_INEXEC flag in other labels. Pointed out by he@netbsd.org --- sys/kern/kern_exec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index a24c7daee84b..3450e3f3fbef 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.149 2002/01/11 21:16:27 christos Exp $ */ +/* $NetBSD: kern_exec.c,v 1.150 2002/01/12 14:20:30 christos Exp $ */ /*- * Copyright (C) 1993, 1994, 1996 Christopher G. Demetriou @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.149 2002/01/11 21:16:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.150 2002/01/12 14:20:30 christos Exp $"); #include "opt_ktrace.h" #include "opt_syscall_debug.h" @@ -721,6 +721,7 @@ sys_execve(struct proc *p, void *v, register_t *retval) uvm_km_free_wakeup(exec_map, (vaddr_t) argp, NCARGS); freehdr: + p->p_flag &= ~P_INEXEC; #ifdef LKM lockmgr(&exec_lock, LK_RELEASE, NULL); #endif @@ -729,6 +730,7 @@ sys_execve(struct proc *p, void *v, register_t *retval) return error; exec_abort: + p->p_flag &= ~P_INEXEC; #ifdef LKM lockmgr(&exec_lock, LK_RELEASE, NULL); #endif