diff options
| author | Josef Bacik <josef@toxicpanda.com> | 2026-10-28 10:42:19 -0600 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-10-28 11:41:41 -0700 |
| commit | 81ce4d9bbe8cf47d4b023e932ee29b22367545e6 (patch) | |
| tree | c0710cd30b9b6793edebd64e4294722be7a4200c /tools/lib/python | |
| parent | ece0f4e67f08792c8572080fb0fcc231554f08ca (diff) | |
nvmet: fix NULL dereference in debugfs host_traddr
The host_traddr callbacks of tcp, rdma and fc take the host address from
the transport queue around ctrl->sqs[0], which nvmet_sq_destroy() clears
when the admin queue goes away while the controller lives on with its
I/O queues. A host that closes the admin connection and keeps an I/O
queue leaves such a controller behind, and reading its host_traddr in
debugfs dereferences a near-NULL pointer:
BUG: kernel NULL pointer dereference, address: 00000000000002e0
RIP: 0010:nvmet_tcp_host_port_addr+0x19/0x50 [nvmet_tcp]
Don't ask the transport if there's no admin queue. Nothing holds the
queue for debugfs, so a reader that's past the check when the queue
goes away is still on its own.
Fixes: 7e5c3de3f2f2 ("nvmet: add 'host_traddr' callback for debugfs")
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
