Skip to content

Commit 79bd7ea

Browse files
Chaitanya Kulkarnikeithbusch
authored andcommitted
nvme-fabrics: fix I/O connect error handling
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: f50fff7 ("nvme: implement In-Band authentication") Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent 5f63a49 commit 79bd7ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/nvme/host/fabrics.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid)
534534
if (ret) {
535535
nvmf_log_connect_error(ctrl, ret, le32_to_cpu(res.u32),
536536
&cmd, data);
537+
goto out_free_data;
537538
}
538539
result = le32_to_cpu(res.u32);
539540
if (result & (NVME_CONNECT_AUTHREQ_ATR | NVME_CONNECT_AUTHREQ_ASCR)) {

0 commit comments

Comments
 (0)