I guess your test case is more complicated than the above CVE, which
should be triggered in single queue case.
Looks this approach isn't correct:commit dc9edc44de6c pushing the final release of request_queue to a
1) there are other sleepers in __blk_release_queue(), such blk-mq sysfs
kobject_put(), or cancel_delayed_work_sync(), ...
2) wrt. loop, the request queue's release handler may not be called yetThe reason of the problem is because the final release of request_queue
after loop_remove() returns, so this patch may not avoid the issue in
your step 3 in which blk_mq_debugfs_register fails when adding new loop
device. So release not by wq just reduces the chance, instead of fixing
it completely.
.