diff options
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index f0554e0..22dba08 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -658,15 +658,14 @@ loop: return (0); } - sx_xlock(&allproc_lock); - LIST_REMOVE(p, p_list); /* off zombproc */ - sx_xunlock(&allproc_lock); - - LIST_REMOVE(p, p_sibling); /* * Remove other references to this process to ensure * we have an exclusive reference. */ + sx_xlock(&allproc_lock); + LIST_REMOVE(p, p_list); /* off zombproc */ + sx_xunlock(&allproc_lock); + LIST_REMOVE(p, p_sibling); leavepgrp(p); sx_xunlock(&proctree_lock); |