cfq_get_queue()->cfq_find_alloc_queue() can fail, check the returned value.
Signed-off-by: Oleg Nesterov <[email protected]>
--- K/block/cfq-iosched.c~3_get 2007-10-20 15:48:35.000000000 +0400
+++ K/block/cfq-iosched.c 2007-10-20 17:05:30.000000000 +0400
@@ -1443,8 +1443,11 @@ cfq_get_queue(struct cfq_data *cfqd, int
cfqq = *async_cfqq;
}
- if (!cfqq)
+ if (!cfqq) {
cfqq = cfq_find_alloc_queue(cfqd, is_sync, tsk, gfp_mask);
+ if (!cfqq)
+ return NULL;
+ }
/*
* pin the queue now that it's allocated, scheduler exit will prune it
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]