Skip to content
Commit 50e34d78 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

block: disable the elevator int del_gendisk

The elevator is only used for file system requests, which are stopped in
del_gendisk.  Move disabling the elevator and freeing the scheduler tags
to the end of del_gendisk instead of doing that work in disk_release and
blk_cleanup_queue to avoid a use after free on q->tag_set from
disk_release as the tag_set might not be alive at that point.

Move the blk_qos_exit call as well, as it just depends on the elevator
exit and would be the only reason to keep the not exactly cheap queue
freeze in disk_release.

Fixes: e155b0c2

 ("blk-mq: Use shared tags for shared sbitmap support")
Reported-by: default avatar <syzbot+3e3f419f4a7816471838@syzkaller.appspotmail.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Tested-by: default avatar <syzbot+3e3f419f4a7816471838@syzkaller.appspotmail.com>
Link: https://lore.kernel.org/r/20220614074827.458955-2-hch@lst.de
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b96f3cab
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment