projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
null_blk: Null pointer deference problem in alloc_page_buffers
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
drivers
/
block
/
null_blk.c
diff --git
a/drivers/block/null_blk.c
b/drivers/block/null_blk.c
index
a2e69d2
..
a01d7f6
100644
(file)
--- a/
drivers/block/null_blk.c
+++ b/
drivers/block/null_blk.c
@@
-622,6
+622,11
@@
static int __init null_init(void)
irqmode = NULL_IRQ_NONE;
}
#endif
irqmode = NULL_IRQ_NONE;
}
#endif
+ if (bs > PAGE_SIZE) {
+ pr_warn("null_blk: invalid block size\n");
+ pr_warn("null_blk: defaults block size to %lu\n", PAGE_SIZE);
+ bs = PAGE_SIZE;
+ }
if (queue_mode == NULL_Q_MQ && use_per_node_hctx) {
if (submit_queues < nr_online_nodes) {
if (queue_mode == NULL_Q_MQ && use_per_node_hctx) {
if (submit_queues < nr_online_nodes) {