]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: Avoid that submitting a bio concurrently with device removal triggers a crash
authorBart Van Assche <bart.vanassche@wdc.com>
Tue, 10 Apr 2018 23:02:40 +0000 (17:02 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Apr 2018 23:46:40 +0000 (17:46 -0600)
commite0d608076667f4bf8d849faf7953a66f9c77ac4c
tree3b3add4672c9e0391bead53a764718e92d131983
parent1a93701f9a720b80d64e5f650c932d771f85cfed
blk-mq: Avoid that submitting a bio concurrently with device removal triggers a crash

Because blkcg_exit_queue() is now called from inside blk_cleanup_queue()
it is no longer safe to access cgroup information during or after the
blk_cleanup_queue() call. Hence protect the generic_make_request_checks()
call with blk_queue_enter() / blk_queue_exit().

Reported-by: Ming Lei <ming.lei@redhat.com>
Fixes: 981154fab999 ("block: Fix a race between request queue removal and the block cgroup controller")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Joseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c