[PATCHv2] nvme: authentication error are always non-retryable

Daniel Wagner dwagner at suse.de
Mon Feb 26 06:01:01 PST 2024


On Mon, Feb 26, 2024 at 11:54:13AM +0100, Hannes Reinecke wrote:
> Maybe this?

nvme_uninit_ctrl already puts the ref, thus the nvme_put_ctrl in
nvme_loop_create_crtl is one too much:

diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index de2ff7ed0657..bcda781e52f2 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -615,7 +615,6 @@ static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev,
        kfree(ctrl->queues);
 out_uninit_ctrl:
        nvme_uninit_ctrl(&ctrl->ctrl);
-       nvme_put_ctrl(&ctrl->ctrl);
 out_free_opts:
        nvmf_ctrl_options_put(opts);
 out_free_ctrl:


This leaves us with -111 (-ECONNREFUSED)

[  274.702672] nvmet: ctrl 1 fatal error occurred!
[  274.704673] nvme nvme2: qid 0: authentication failed, error -111
[  274.706212] nvme nvme2: NVME-FC{0}: create_assoc failed, assoc_id 2334a5aaec310000 ret -111
[  274.711653] nvme nvme2: NVME-FC{0}: reset: Reconnect attempt failed (-111)
[  274.713119] nvme_fc: nvme_fc_reconnect_or_delete:3356 ctrl 000000009ff229b7 status -111
[  274.714719] nvme nvme2: NVME-FC{0}: Reconnect attempt in 2 seconds



More information about the Linux-nvme mailing list