mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rvmet-fcloop: Remove remote port from list when unlinking
@ 2023-04-11  9:22 Daniel Wagner
  2023-04-11 10:09 ` Daniel Wagner
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Wagner @ 2023-04-11  9:22 UTC (permalink / raw)
  To: linux-nvme
  Cc: linux-kernel, Sagi Grimberg, James Smart, Chaitanya Kulkarni,
	Daniel Wagner

The remote port is never removed from fcloop_nports list. During module
unloading it's possible to end up an busy loop in fcloop_exit, because
the remote port is found in the list and thus we will never progress.

The kernel log will be spammed with

  nvme_fcloop: fcloop_exit: Failed deleting remote port
  nvme_fcloop: fcloop_exit: Failed deleting target port

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 drivers/nvme/target/fcloop.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c
index 5c16372f3b53..1e53c8fe4b95 100644
--- a/drivers/nvme/target/fcloop.c
+++ b/drivers/nvme/target/fcloop.c
@@ -1352,6 +1352,8 @@ __unlink_remote_port(struct fcloop_nport *nport)
 		nport->tport->remoteport = NULL;
 	nport->rport = NULL;
 
+	list_del(&nport->nport_list);
+
 	return rport;
 }
 
-- 
2.40.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] rvmet-fcloop: Remove remote port from list when unlinking
  2023-04-11  9:22 [PATCH] rvmet-fcloop: Remove remote port from list when unlinking Daniel Wagner
@ 2023-04-11 10:09 ` Daniel Wagner
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Wagner @ 2023-04-11 10:09 UTC (permalink / raw)
  To: linux-nvme; +Cc: linux-kernel, Sagi Grimberg, James Smart, Chaitanya Kulkarni

On Tue, Apr 11, 2023 at 11:22:09AM +0200, Daniel Wagner wrote:
> The remote port is never removed from fcloop_nports list. During module
> unloading it's possible to end up an busy loop in fcloop_exit, because
> the remote port is found in the list and thus we will never progress.
> 
> The kernel log will be spammed with
> 
>   nvme_fcloop: fcloop_exit: Failed deleting remote port
>   nvme_fcloop: fcloop_exit: Failed deleting target port
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---

Found a bunch more problems which need to be addressed. I'll collect all
changes and send them as series.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-11 10:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-11  9:22 [PATCH] rvmet-fcloop: Remove remote port from list when unlinking Daniel Wagner
2023-04-11 10:09 ` Daniel Wagner

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®