diff options
| author | Chaitanya Kulkarni <ckulkarnilinux@gmail.com> | 2025-12-19 16:18:42 -0800 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-01-09 06:55:12 -0800 |
| commit | d1877cc7270302081a315a81a0ee8331f19f95c8 (patch) | |
| tree | 55f39e57fdb2a256f39f0622811b197b7ca19150 /include/uapi/linux/mqueue.h | |
| parent | 7d3fa7e954934fbda0a017ac1c305b7b10ecceef (diff) | |
nvme-fc: release admin tagset if init fails
nvme_fabrics creates an NVMe/FC controller in following path:
nvmf_dev_write()
-> nvmf_create_ctrl()
-> nvme_fc_create_ctrl()
-> nvme_fc_init_ctrl()
nvme_fc_init_ctrl() allocates the admin blk-mq resources right after
nvme_add_ctrl() succeeds. If any of the subsequent steps fail (changing
the controller state, scheduling connect work, etc.), we jump to the
fail_ctrl path, which tears down the controller references but never
frees the admin queue/tag set. The leaked blk-mq allocations match the
kmemleak report seen during blktests nvme/fc.
Check ctrl->ctrl.admin_tagset in the fail_ctrl path and call
nvme_remove_admin_tag_set() when it is set so that all admin queue
allocations are reclaimed whenever controller setup aborts.
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Reviewed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Chaitanya Kulkarni <ckulkarnilinux@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'include/uapi/linux/mqueue.h')
0 files changed, 0 insertions, 0 deletions
