diff options
author | ache <ache@FreeBSD.org> | 2006-12-16 20:33:26 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2006-12-16 20:33:26 +0000 |
commit | 84d03f55f7b237a1b815440821f87aeecd4d02f7 (patch) | |
tree | 04377a439c5a34cd41a4bb1ed6ea457098a1ef1c /sys | |
parent | 10e46645522be17076262545d5ddf178b3ebab64 (diff) | |
download | FreeBSD-src-84d03f55f7b237a1b815440821f87aeecd4d02f7.zip FreeBSD-src-84d03f55f7b237a1b815440821f87aeecd4d02f7.tar.gz |
Fix NULL pointer reference for INVARIANTS case
Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/subr_sleepqueue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index cc1fc89..4479d13 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -295,6 +295,7 @@ sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags, * into the sleep queue already in use by this wait channel. */ if (sq == NULL) { + sq = td->td_sleepqueue; #ifdef INVARIANTS int i; for (i = 0; i < NR_SLEEPQS; i++) @@ -313,7 +314,6 @@ sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags, sleepq_max_depth = sc->sc_max_depth; } #endif - sq = td->td_sleepqueue; LIST_INSERT_HEAD(&sc->sc_queues, sq, sq_hash); sq->sq_wchan = wchan; #ifdef INVARIANTS |