]> git.baikalelectronics.ru Git - kernel.git/commit
null_blk: oops when initializing without lightnvm
authorMatias Bjørling <m@bjorling.me>
Thu, 11 Feb 2016 13:49:13 +0000 (14:49 +0100)
committerJens Axboe <axboe@fb.com>
Thu, 11 Feb 2016 15:56:09 +0000 (08:56 -0700)
commit32dd5a835fb42759c5dfcc610be764b72e2234be
treeed0a0c9368e06db907c7d0e58dddf27df7fe0558
parent3b6c9c91e4434081c3005e38f55a36832824b891
null_blk: oops when initializing without lightnvm

If the LightNVM subsystem is not compiled into the kernel, and the
null_blk device driver requests lightnvm to be initialized. The call to
nvm_register fails and the null_add_dev function cleans up the
initialization. However, at this point the null block device has
already been added to the nullb_list and thus a second cleanup will
occur when the function has returned, that leads to a double call to
blk_cleanup_queue.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/null_blk.c