diff options
author | kib <kib@FreeBSD.org> | 2009-07-14 22:50:41 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-07-14 22:50:41 +0000 |
commit | bd93a0c99aeae8ceb8cb06ce8f941dd42f51b0bc (patch) | |
tree | edfdc0d609693bf9b19c6c4798ab14a951073593 /sys/kern | |
parent | 57ca4583e728cab422fba8f15de10bd0b637b3dd (diff) | |
download | FreeBSD-src-bd93a0c99aeae8ceb8cb06ce8f941dd42f51b0bc.zip FreeBSD-src-bd93a0c99aeae8ceb8cb06ce8f941dd42f51b0bc.tar.gz |
When wakeup(9) is going to notify swapper, assert that wait channel is not
equal to &proc0. It shall be not, since proc0 stack is not swappable, and
kick_proc0() is wakeup(&proc0).
Reviewed by: jhb
Approved by: re (kensmith)
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_synch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index b91c1a5..aad12b6 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -347,8 +347,11 @@ wakeup(void *ident) sleepq_lock(ident); wakeup_swapper = sleepq_broadcast(ident, SLEEPQ_SLEEP, 0, 0); sleepq_release(ident); - if (wakeup_swapper) + if (wakeup_swapper) { + KASSERT(ident != &proc0, + ("wakeup and wakeup_swapper and proc0")); kick_proc0(); + } } /* |