]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: fix deadlock in blk_mq_register_disk() error path
authorJens Axboe <axboe@fb.com>
Tue, 2 Aug 2016 14:45:44 +0000 (08:45 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 4 Aug 2016 20:19:16 +0000 (14:19 -0600)
commitb35d6c87bd3e383330875154f0242be6c08d6541
tree30fa18a04776d8735fd75d7c7adf9c4eb36d24bf
parente87fb0e7ac89ecd2fbd1468f6db7112c6207722b
blk-mq: fix deadlock in blk_mq_register_disk() error path

If we fail registering any of the hardware queues, we call
into blk_mq_unregister_disk() with the hotplug mutex already
held. Since blk_mq_unregister_disk() attempts to acquire the
same mutex, we end up in a less than happy place.

Reported-by: Jinpu Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq-sysfs.c