From: Keith Busch <kbusch@kernel.org>
To: Chaitanya Kulkarni <ckulkarnilinux@gmail.com>
Cc: linux-nvme@lists.infradead.org, justin.tee@broadcom.com,
nareshgottumukkala83@gmail.com, paul.ely@broadcom.com,
axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
yi.zhang@redhat.com
Subject: Re: [BUG FIX PATCH COMPILE TESTED ONLY] nvme-fc: release admin tagset if init fails
Date: Fri, 9 Jan 2026 07:54:15 -0700 [thread overview]
Message-ID: <aWEWlw5I9w5neQSo@kbusch-mbp> (raw)
In-Reply-To: <20251220001842.6027-1-ckulkarnilinux@gmail.com>
On Fri, Dec 19, 2025 at 04:18:42PM -0800, Chaitanya Kulkarni wrote:
> 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.
Thanks, applied.
prev parent reply other threads:[~2026-01-09 14:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-20 0:18 [BUG FIX PATCH COMPILE TESTED ONLY] nvme-fc: release admin tagset if init fails Chaitanya Kulkarni
2026-01-06 18:28 ` Chaitanya Kulkarni
2026-01-07 1:37 ` Justin Tee
2026-01-08 2:10 ` Chaitanya Kulkarni
2026-01-08 22:49 ` Justin Tee
2026-01-08 22:51 ` Justin Tee
2026-01-09 14:54 ` Keith Busch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWEWlw5I9w5neQSo@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=ckulkarnilinux@gmail.com \
--cc=hch@lst.de \
--cc=justin.tee@broadcom.com \
--cc=linux-nvme@lists.infradead.org \
--cc=nareshgottumukkala83@gmail.com \
--cc=paul.ely@broadcom.com \
--cc=sagi@grimberg.me \
--cc=yi.zhang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox