summaryrefslogtreecommitdiff
path: root/block/blk-throttle.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-01-17 11:48:10 -0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:33:26 +0800
commitd5f07ad97fc0d4913a318b8cfcc3bf90602aac61 (patch)
tree2425d6b83a989160ea0b532c2905a4d9e081f685 /block/blk-throttle.c
parentf5ff070430bafa1540f7268476eacae30bf7ef14 (diff)
block: Protect less code with sysfs_lock in blk_{un,}register_queue()
The __blk_mq_register_dev(), blk_mq_unregister_dev(), elv_register_queue() and elv_unregister_queue() calls need to be protected with sysfs_lock but other code in these functions not. Hence protect only this code with sysfs_lock. This patch fixes a locking inversion issue in blk_unregister_queue() and also in an error path of blk_register_queue(): it is not allowed to hold sysfs_lock around the kobject_del(&q->kobj) call. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> (cherry picked from commit 2c2086afc2b8b974fac32cb028e73dc27bfae442)
Diffstat (limited to 'block/blk-throttle.c')
0 files changed, 0 insertions, 0 deletions