blk-mq-sched: add framework for MQ capable IO schedulers
Hello Jens Axboe,
This is a semi-automatic email about new static checker warnings.
The patch bd166ef183c2: "blk-mq-sched: add framework for MQ capable IO schedulers" from Jan 17, 2017, leads to the following Smatch complaint:
block/elevator.c:234 elevator_init()
error: we previously assumed 'e' could be null (see line 229)
block/elevator.c
228
229 if (!e) {
^^Null.
230 printk(KERN_ERR
231 "Default I/O scheduler not found. " \
232 "Using noop/none.\n");
233 if (q->mq_ops) {
234 elevator_put(e);
^^^^^^^^^^^^^^^This will Oops.
235 return 0;
236 }
regards,
dan carpenter
Quoted 23 lines · Dan Carpenter
Hello Jens Axboe,
This is a semi-automatic email about new static checker warnings.
The patch
bd166ef183c2: "blk-mq-sched: add framework for MQ capable IO schedulers" from Jan 17, 2017, leads to the following Smatch complaint:
block/elevator.c:234elevator_init()
error: we previously assumed 'e' could be null (see line 229)
block/elevator.c
228229 if (!e) { ^^Null.
230 printk(KERN_ERR 231 "Default I/O scheduler not found. " \ 232 "Using noop/none.\n"); 233 if (q->mq_ops) { 234 elevator_put(e); ^^^^^^^^^^^^^^^
Quoted 4 lines
This will Oops.
235 return 0; 236 }
Good find, thanks Dan. I've killed the elevator_put().
Signature · 1 line
Jens Axboe