From: Keith Busch <kbusch@kernel.org>
To: Martin George <martinus.gpy@gmail.com>
Cc: linux-nvme@lists.infradead.org, hch@lst.de, sagi@grimberg.me
Subject: Re: [PATCH] nvme-fc: fix reference leak in nvme_fc_nvme_discovery_store()
Date: Fri, 23 Oct 2026 16:06:49 -0600 [thread overview]
Message-ID: <atvaec8QBbeb6IAj@kbusch-mbp> (raw)
In-Reply-To: <20261023140057.6045-1-marting@netapp.com>
On Fri, Oct 23, 2026 at 07:30:57PM +0530, Martin George wrote:
> nvme_fc_nvme_discovery_store() takes an lport and rport reference before
> checking whether the rport is already queued on the local discovery
> list. On the retry path (goto restart), rports that were queued in an
> earlier pass are skipped by the list_empty() check, but the references
> taken for them in the current pass are never dropped, leaking one lport
> and one rport reference per retry.
>
> Check list_empty() first and only take references for rports that are
> actually added to the local discovery list.
Thanks, applied to nvme-7.4.
prev parent reply other threads:[~2026-10-23 22:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 14:00 [PATCH] nvme-fc: fix reference leak in nvme_fc_nvme_discovery_store() Martin George
2026-10-23 14:39 ` Laurence Oberman
2026-10-23 22:06 ` 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=atvaec8QBbeb6IAj@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=hch@lst.de \
--cc=linux-nvme@lists.infradead.org \
--cc=martinus.gpy@gmail.com \
--cc=sagi@grimberg.me \
/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