mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Wagner <wagi@kernel.org>
To: Justin Tee <justin.tee@broadcom.com>,
	Christoph Hellwig <hch@lst.de>,  Keith Busch <kbusch@kernel.org>
Cc: James Smart <james.smart@broadcom.com>,
	Jens Axboe <axboe@kernel.dk>,
	 linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	 Daniel Wagner <wagi@kernel.org>
Subject: [PATCH v2 2/5] nvme-fc: check all request and response have been processed
Date: Thu, 30 Oct 2025 11:05:46 +0100	[thread overview]
Message-ID: <20251030-nvmet-fcloop-fixes-v2-2-b8d66a322c51@kernel.org> (raw)
In-Reply-To: <20251030-nvmet-fcloop-fixes-v2-0-b8d66a322c51@kernel.org>

When the rport is removed there shouldn't be any in flight request or
responses.

Reviewed-by: Christoph Hellwig <hch@lst.de>
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 3ff70e6e8131..b613fc5966a7 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -520,6 +520,8 @@ nvme_fc_free_rport(struct kref *ref)
 
 	WARN_ON(rport->remoteport.port_state != FC_OBJSTATE_DELETED);
 	WARN_ON(!list_empty(&rport->ctrl_list));
+	WARN_ON(!list_empty(&rport->ls_req_list));
+	WARN_ON(!list_empty(&rport->ls_rcv_list));
 
 	/* remove from lport list */
 	spin_lock_irqsave(&nvme_fc_lock, flags);

-- 
2.51.1


  parent reply	other threads:[~2025-10-30 10:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30 10:05 [PATCH v2 0/5] nvme-fc: misc small improvents Daniel Wagner
2025-10-30 10:05 ` [PATCH v2 1/5] nvme-fc: don't hold rport lock when putting ctrl Daniel Wagner
2025-10-30 10:05 ` Daniel Wagner [this message]
2025-10-30 10:05 ` [PATCH v2 3/5] nvmet-fcloop: check all request and response have been processed Daniel Wagner
2025-10-30 10:05 ` [PATCH v2 4/5] nvmet-fcloop: remove unused lsdir member Daniel Wagner
2025-10-30 10:05 ` [PATCH v2 5/5] nvmet-fc: use pr_* print macros instead of dev_* Daniel Wagner
2025-10-30 21:44 ` [PATCH v2 0/5] nvme-fc: misc small improvents 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=20251030-nvmet-fcloop-fixes-v2-2-b8d66a322c51@kernel.org \
    --to=wagi@kernel.org \
    --cc=axboe@kernel.dk \
    --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 \
    /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®