summaryrefslogtreecommitdiff
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index d54932106d7..8a048fd5f65 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.92 2007/07/25 23:11:52 art Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.93 2007/10/10 15:53:53 art Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -224,7 +224,6 @@ fork1(struct proc *p1, int exitsig, int flags, void *stack, size_t stacksize,
p2->p_stat = SIDL; /* protect against others */
p2->p_exitsig = exitsig;
- p2->p_forw = p2->p_back = NULL;
#ifdef RTHREADS
if (flags & FORK_THREAD) {
@@ -501,7 +500,12 @@ proc_trampoline_mp(void)
p = curproc;
+ SCHED_ASSERT_LOCKED();
+ __mp_unlock(&sched_lock);
+ spl0();
SCHED_ASSERT_UNLOCKED();
+ KASSERT(__mp_lock_held(&kernel_lock) == 0);
+
KERNEL_PROC_LOCK(p);
}
#endif