* [PATCH V2] nvme-fabrics: fix I/O connect error handling
@ 2024-02-13 8:26 Chaitanya Kulkarni
2024-02-13 16:32 ` Keith Busch
0 siblings, 1 reply; 2+ messages in thread
From: Chaitanya Kulkarni @ 2024-02-13 8:26 UTC (permalink / raw)
To: linux-nvme; +Cc: hare, kbusch, hch, sagi, Chaitanya Kulkarni
In nvmf_connect_io_queue(), if connect I/O command fails, we log the
error and continue for authentication. This overrides error captured
from __nvme_submit_sync_cmd(), causing wrong return value.
Add goto out_free_data after logging connect error to fix the issue.
Fixes: f50fff73d620c ("nvme: implement In-Band authentication")
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
V2: add fixes tag (Christoph)
drivers/nvme/host/fabrics.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 3499acbf6a82..495c171daead 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -534,6 +534,7 @@ int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid)
if (ret) {
nvmf_log_connect_error(ctrl, ret, le32_to_cpu(res.u32),
&cmd, data);
+ goto out_free_data;
}
result = le32_to_cpu(res.u32);
if (result & (NVME_CONNECT_AUTHREQ_ATR | NVME_CONNECT_AUTHREQ_ASCR)) {
--
2.40.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V2] nvme-fabrics: fix I/O connect error handling
2024-02-13 8:26 [PATCH V2] nvme-fabrics: fix I/O connect error handling Chaitanya Kulkarni
@ 2024-02-13 16:32 ` Keith Busch
0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2024-02-13 16:32 UTC (permalink / raw)
To: Chaitanya Kulkarni; +Cc: linux-nvme, hare, hch, sagi
On Tue, Feb 13, 2024 at 12:26:46AM -0800, Chaitanya Kulkarni wrote:
> In nvmf_connect_io_queue(), if connect I/O command fails, we log the
> error and continue for authentication. This overrides error captured
> from __nvme_submit_sync_cmd(), causing wrong return value.
>
> Add goto out_free_data after logging connect error to fix the issue.
>
> Fixes: f50fff73d620c ("nvme: implement In-Band authentication")
> Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Thanks, applied to nvme-6.8.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-13 16:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-13 8:26 [PATCH V2] nvme-fabrics: fix I/O connect error handling Chaitanya Kulkarni
2024-02-13 16:32 ` Keith Busch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox