summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-04-20 10:03:44 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-04-20 10:03:44 +0000
commitdcc4a09ef0d0caaf7f3266f78db566076dfc5ee7 (patch)
tree13fd0def39cdaedd6c649553bea1ddd13f4f258f /sys/kern/kern_exit.c
parentac8ba1f2ea6355c1c23627cb91ba3ceabd2142f9 (diff)
Add a function "ktrsettracevnode", that changes the ktrace vnode for a process
in a correct way. Use it in all places where the vnode was changed. (most of the earlier code was incorrect and had races).
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 5efdeea121a..97a98643f58 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.22 2000/03/23 15:55:52 art Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.23 2000/04/20 10:03:43 art Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -63,6 +63,7 @@
#include <sys/filedesc.h>
#include <sys/signalvar.h>
#include <sys/sched.h>
+#include <sys/ktrace.h>
#ifdef SYSVSHM
#include <sys/shm.h>
#endif
@@ -210,7 +211,7 @@ exit1(p, rv)
*/
p->p_traceflag = 0; /* don't trace the vrele() */
if (p->p_tracep)
- vrele(p->p_tracep);
+ ktrsettracevnode(p, NULL);
#endif
/*
* Remove proc from allproc queue and pidhash chain.