From: Greg KH <gregkh@linuxfoundation.org>
To: Bin Luo <luob87709@gmail.com>
Cc: linux-nvme@lists.infradead.org, nareshgottumukkala83@gmail.com,
paul.ely@broadcom.com, hch@lst.de, sagi@grimberg.me,
kch@nvidia.com
Subject: Re: [PATCH] nvmet-fc: hold queue reference while freeing FCP IOD
Date: Wed, 25 Nov 2026 14:48:57 +0100 [thread overview]
Message-ID: <2026112534-customer-strep-466e@gregkh> (raw)
In-Reply-To: <20261125115444.783-1-luob87709@gmail.com>
On Wed, Nov 25, 2026 at 07:54:44PM +0800, Bin Luo wrote:
> nvmet_fc_free_fcp_iod() drops the FOD's lookup reference before it locks
> queue->qlock and accesses the queue lists. Association teardown may already
> have dropped the owner reference, so this put can free the queue before
> completion accesses it.
>
> Take a temporary queue reference before dropping the FOD reference. Hold it
> through queue/list accesses and deferred-work submission.
> Release it on both FOD-return and FOD-reuse paths. The deferred request's
> lookup reference stays with the recycled FOD.
>
> Fixes: 619c62dcc62b ("nvmet-fc: correct ref counting error when deferred rcv used")
>
> Tested: v7.4-rc1 KASAN_GENERIC x86_64 QEMU with a test-only owner-reference
> injection. Unfixed baseline reports UAF; both patched runs have no KASAN.
That's not a valid tag.
And no empty line between Fixes: and your signed-off-by.
thanks,
greg k-h
next prev parent reply other threads:[~2026-11-25 14:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 11:54 [PATCH] nvmet-fc: hold queue reference while freeing FCP IOD Bin Luo
2026-11-25 12:15 ` sashiko-bot
2026-11-25 13:48 ` Greg KH [this message]
2026-11-25 13:50 ` Greg KH
2026-11-26 5:16 ` [PATCH v2] nvmet-fc: put queue ref after FCP IOD cleanup Bin Luo
2026-11-26 8:42 ` Christoph Hellwig
2026-11-30 15:56 ` Keith Busch
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=2026112534-customer-strep-466e@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=kch@nvidia.com \
--cc=linux-nvme@lists.infradead.org \
--cc=luob87709@gmail.com \
--cc=nareshgottumukkala83@gmail.com \
--cc=paul.ely@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.