From: Daniel Wagner <dwagner@suse.de>
To: Hannes Reinecke <hare@suse.de>
Cc: Daniel Wagner <wagi@kernel.org>,
Justin Tee <justin.tee@broadcom.com>,
Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@kernel.org>,
James Smart <james.smart@broadcom.com>,
Jens Axboe <axboe@kernel.dk>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] nvme-fc: don't hold rport lock when putting ctrl
Date: Tue, 4 Nov 2025 13:32:04 +0100 [thread overview]
Message-ID: <bf2b3a79-4e6e-4572-aa96-c318cb496cda@flourine.local> (raw)
In-Reply-To: <accf6ad7-047b-48d0-b626-f3ef0facd649@suse.de>
On Tue, Nov 04, 2025 at 11:51:09AM +0100, Hannes Reinecke wrote:
> On 10/28/25 16:26, Daniel Wagner wrote:
> > nvme_fc_ctrl_put can acquire the rport lock when freeing the
> > ctrl object:
> >
> > nvme_fc_ctrl_put
> > nvme_fc_ctrl_free
> > spin_lock_irqsave(rport->lock)
> >
> > Thus we can't hold the rport lock when calling nvme_fc_ctrl_put.
> >
> > Signed-off-by: Daniel Wagner <wagi@kernel.org>
> > ---
> > drivers/nvme/host/fc.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> > index 03987f497a5b..2c0ea843ae57 100644
> > --- a/drivers/nvme/host/fc.c
> > +++ b/drivers/nvme/host/fc.c
> > @@ -1488,7 +1488,9 @@ nvme_fc_match_disconn_ls(struct nvme_fc_rport *rport,
> > if (ret)
> > /* leave the ctrl get reference */
> > break;
> > + spin_unlock_irqrestore(&rport->lock, flags);
> > nvme_fc_ctrl_put(ctrl);
> > + spin_lock_irqsave(&rport->lock, flags);
> > }
> > spin_unlock_irqrestore(&rport->lock, flags);
> >
> In theory, yes.
I hit this in practice ;)
next prev parent reply other threads:[~2025-11-04 12:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 15:26 [PATCH 0/5] nvme-fc: misc small improvents Daniel Wagner
2025-10-28 15:26 ` [PATCH 1/5] nvme-fc: don't hold rport lock when putting ctrl Daniel Wagner
2025-10-29 8:51 ` Christoph Hellwig
2025-11-04 10:51 ` Hannes Reinecke
2025-11-04 12:32 ` Daniel Wagner [this message]
2025-10-28 15:26 ` [PATCH 2/5] nvme-fc: check all request and response have been processed Daniel Wagner
2025-10-29 8:51 ` Christoph Hellwig
2025-11-04 10:51 ` Hannes Reinecke
2025-10-28 15:26 ` [PATCH 3/5] nvmet-fcloop: " Daniel Wagner
2025-10-29 8:52 ` Christoph Hellwig
2025-11-04 10:52 ` Hannes Reinecke
2025-10-28 15:26 ` [PATCH 4/5] nvmet-fcloop: remove unused lsdir member Daniel Wagner
2025-10-29 8:52 ` Christoph Hellwig
2025-11-04 10:52 ` Hannes Reinecke
2025-10-28 15:26 ` [PATCH 5/5] nvmet-fc: use pr_* print macros instead of dev_* Daniel Wagner
2025-10-28 15:47 ` Daniel Wagner
2025-10-29 8:52 ` Christoph Hellwig
2025-11-04 10:54 ` Hannes Reinecke
2025-10-29 0:33 [PATCH 1/5] nvme-fc: don't hold rport lock when putting ctrl Justin Tee
2025-10-29 10:05 ` Daniel Wagner
2025-10-29 16:36 ` Justin Tee
2025-10-30 9:49 ` Daniel Wagner
2025-10-30 22:02 ` Justin Tee
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=bf2b3a79-4e6e-4572-aa96-c318cb496cda@flourine.local \
--to=dwagner@suse.de \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=justin.tee@broadcom.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=wagi@kernel.org \
/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
all inboxes | Powered by JetHome®