diff options
| author | Josef Bacik <josef@toxicpanda.com> | 2026-10-28 10:41:41 -0600 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-10-29 07:15:47 -0600 |
| commit | 4fcc499ea9bc31b02393904a1903e794d146f5f7 (patch) | |
| tree | daf05d22325ffd8a5139d14567a6139ce70053c9 /tools/lib/python | |
| parent | 89a2381482d8ff8e4fe0b7d32797bb4f77503b89 (diff) | |
blk-mq: set up a queue under tag_list_lock
blk_mq_init_allocated_queue() only takes tag_list_lock at the end, when
it adds the queue to the set. Before that it sizes the queue by
set->nr_hw_queues, hands out set->tags[], maps by set->map[], and
blk_mq_map_swqueue() frees tags of the set. An update clearing the maps
at that time makes the new queue free tags that all the other queues
share. An NVMe controller reset during a namespace scan does exactly
that.
Take the lock before the first look at the set. An update can be part of
error handling, so the allocations under the lock must not wait for IO:
memalloc_noio_save(), as in add_disk_fwnode().
Fixes: 868f2f0b7206 ("blk-mq: dynamic h/w context count")
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Link: https://patch.msgid.link/20261028164415.1262013-39-axboe@kernel.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
