summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2010-07-19 23:00:16 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2010-07-19 23:00:16 +0000
commit0e2a87ffb51089aee8ccac74c432e733c0459f04 (patch)
treec4b0c56994c49e3b6f189d20a0bd11bc0f70ae9e /sys/kern/kern_exit.c
parentd7275937acf4315e99996f8b11701b6d194761f9 (diff)
Rollback the allproclk and fileheadlk addition. When grabbing an
rwlock, the thread will release biglock if it sleeps, means that atomicity from before the rw_enter() to after it is not guaranteed. The change didn't address those, so pulling it until it does. "go for it" tedu@
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index d8fc8a2e97e..bf36116bd53 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.94 2010/06/29 20:25:57 guenther Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.95 2010/07/19 23:00:15 guenther Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -242,7 +242,6 @@ exit1(struct proc *p, int rv, int flags)
* deadproc list later (using the p_hash member), and
* wake up the reaper when we do.
*/
- rw_enter_write(&allproclk);
/*
* NOTE: WE ARE NO LONGER ALLOWED TO SLEEP!
*/
@@ -251,7 +250,6 @@ exit1(struct proc *p, int rv, int flags)
LIST_REMOVE(p, p_hash);
LIST_REMOVE(p, p_list);
LIST_INSERT_HEAD(&zombproc, p, p_list);
- rw_exit_write(&allproclk);
/*
* Give orphaned children to init(8).
@@ -568,9 +566,7 @@ proc_zap(struct proc *p)
* Unlink it from its process group and free it.
*/
leavepgrp(p);
- rw_enter_write(&allproclk);
LIST_REMOVE(p, p_list); /* off zombproc */
- rw_exit_write(&allproclk);
LIST_REMOVE(p, p_sibling);
/*