diff options
| author | Kirtikumar Anandrao Ramchandani <kirtiar15502@gmail.com> | 2026-11-05 20:32:23 +0100 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-11-05 20:32:23 +0100 |
| commit | ae310e4ad872a42f4707a596e66417f2aaa52826 (patch) | |
| tree | d0e27a6b9f40bf6e7e3d7b63704290e6ad91beef /rust/kernel/alloc/kvec/errors.rs | |
| parent | c4965effbe15f837a8089e79c0fc17ab19363cce (diff) | |
dm: Reject table setup after queue or disk teardown
A failed table load can leave a mapped device in a state where its
queue has already been initialized or its disk has been removed, while
md->type is still DM_TYPE_NONE. A later table load then calls
blk_mq_init_allocated_queue() on the same queue. If del_gendisk() exited
the old hardware contexts, blk_mq_exit_hctx() dereferences their cleared
flush queue pointer.
Reject setup attempts after queue initialization or disk removal. A
failed request queue initialization still leaves md->tag_set NULL and
can be retried. Set the request-based disk operations only after that
initialization succeeds, so an unsuccessful attempt cannot leave a
bio-based retry with request-based operations.
Reported-by: syzbot+5307e3bcacec2ce4c2f0@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=5307e3bcacec2ce4c2f0
Cc: stable@vger.kernel.org
Signed-off-by: Kirtikumar Anandrao Ramchandani <kirtiar15502@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
