diff options
| author | Daniel Wagner <wagi@kernel.org> | 2026-10-14 09:46:41 +0200 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-10-21 13:28:27 -0700 |
| commit | 9588769af5fc8ac12290d48ce1014a78916681fc (patch) | |
| tree | 6f428eff3030f8b1f6d2db3777ad16b98d1ecb04 /tools/lib/python | |
| parent | a504cd79b1670488cf66d56a3c96b2b93b1fd900 (diff) | |
nvme-fabrics: reset io_queues before computing the queue mapping
nvmf_set_io_queues only sets the io_queues entries of the queue types it
hands out, but the array is reused on every reconnect. When the
controller grants fewer queues on a reconnect, stale entries survive and
nvmf_map_queues maps CPUs to hardware contexts that don't exist anymore,
which crashes blk_mq_map_swqueue with a NULL pointer dereference. E.g.
with nr_io_queues=8, nr_write_queues=8 and nr_poll_queues=8, 24 queues
are mapped 8/8/8 (default/read/poll). If the controller grants only 16
queues on the reconnect, the poll map still starts at hardware context
16.
Clear the array before computing the new mapping.
Fixes: 6486199378a5 ("nvme-tcp: fix queue mapping when queue count is limited")
Fixes: 5651cd3c4336 ("nvme-rdma: fix queue mapping when queue count is limited")
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Tested-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
