Skip to content
Commit 8bdf7b3f authored by John Garry's avatar John Garry Committed by Jens Axboe
Browse files

blk-mq-sched: Don't reference queue tagset in blk_mq_sched_tags_teardown()

We should not reference the queue tagset in blk_mq_sched_tags_teardown()
(see function comment) for the blk-mq flags, so use the passed flags
instead.

This solves a use-after-free, similarly fixed earlier (and since broken
again) in commit f0c1c4d2

 ("blk-mq: fix use-after-free in
blk_mq_exit_sched").

Reported-by: default avatarLinux Kernel Functional Testing <lkft@linaro.org>
Reported-by: default avatarNaresh Kamboju <naresh.kamboju@linaro.org>
Tested-by: default avatarAnders Roxell <anders.roxell@linaro.org>
Fixes: e155b0c2

 ("blk-mq: Use shared tags for shared sbitmap support")
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1634890340-15432-1-git-send-email-john.garry@huawei.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 297db731
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