diff options
author | jhb <jhb@FreeBSD.org> | 2011-04-06 17:47:22 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2011-04-06 17:47:22 +0000 |
commit | 96b1d8b6d77acdb5fb5d615776525213574ca4a1 (patch) | |
tree | e1a7d23b047f49d9788c92447c38bbdf67e1b7bc /sys/kern/sched_4bsd.c | |
parent | 1f9ba05458bd93ceac8e442ead548c21930d610b (diff) | |
download | FreeBSD-src-96b1d8b6d77acdb5fb5d615776525213574ca4a1.zip FreeBSD-src-96b1d8b6d77acdb5fb5d615776525213574ca4a1.tar.gz |
Fix several places to ignore processes that are not yet fully constructed.
MFC after: 1 week
Diffstat (limited to 'sys/kern/sched_4bsd.c')
-rw-r--r-- | sys/kern/sched_4bsd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index c96d7b5..3129222 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -463,6 +463,10 @@ schedcpu(void) sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); + if (p->p_state == PRS_NEW) { + PROC_UNLOCK(p); + continue; + } FOREACH_THREAD_IN_PROC(p, td) { awake = 0; thread_lock(td); |