All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guixin Liu <kanie@linux.alibaba.com>
To: hch@lst.de, sagi@grimberg.me, kch@nvidia.com
Cc: linux-nvme@lists.infradead.org
Subject: [PATCH 1/5] nvmet: fix wrong error handling approach in nvmet_install_queue
Date: Wed, 13 Dec 2023 14:32:48 +0800	[thread overview]
Message-ID: <1702449172-8920-2-git-send-email-kanie@linux.alibaba.com> (raw)
In-Reply-To: <1702449172-8920-1-git-send-email-kanie@linux.alibaba.com>

In the nvmet_install_queue() function, do not set the ctrl pointer
to NULL if the sqsize check fails.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
 drivers/nvme/target/fabrics-cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c
index d8da840..9cffb64 100644
--- a/drivers/nvme/target/fabrics-cmd.c
+++ b/drivers/nvme/target/fabrics-cmd.c
@@ -147,8 +147,7 @@ static u16 nvmet_install_queue(struct nvmet_ctrl *ctrl, struct nvmet_req *req)
 		pr_warn("queue size zero!\n");
 		req->error_loc = offsetof(struct nvmf_connect_command, sqsize);
 		req->cqe->result.u32 = IPO_IATTR_CONNECT_SQE(sqsize);
-		ret = NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR;
-		goto err;
+		return NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR;
 	}
 
 	if (ctrl->sqs[qid] != NULL) {
-- 
1.8.3.1



  reply	other threads:[~2023-12-13  6:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13  6:32 [PATCH 0/5] *** bugfixes and code refactoring for nvme target *** Guixin Liu
2023-12-13  6:32 ` Guixin Liu [this message]
2023-12-13  8:43   ` [PATCH 1/5] nvmet: fix wrong error handling approach in nvmet_install_queue Christoph Hellwig
2023-12-13 12:49     ` Guixin Liu
2023-12-13 13:45       ` Sagi Grimberg
2023-12-13  6:32 ` [PATCH 2/5] nvmet: allow identical cntlid_min and cntlid_max settings Guixin Liu
2023-12-13  8:43   ` Christoph Hellwig
2023-12-13 13:46   ` Sagi Grimberg
2023-12-13  6:32 ` [PATCH 3/5] nvmet: remove cntlid_min and cntlid_max check in nvmet_alloc_ctrl Guixin Liu
2023-12-13  8:43   ` Christoph Hellwig
2023-12-13 13:47   ` Sagi Grimberg
2023-12-13  6:32 ` [PATCH 4/5] nvmet: relocate the cntlid_ida to the internal of subsystem Guixin Liu
2023-12-13  8:46   ` Christoph Hellwig
2023-12-13 12:59     ` Guixin Liu
2023-12-13 15:37       ` Christoph Hellwig
2023-12-13  6:32 ` [PATCH 5/5] nvmet: return invalid filed when check fctype fails Guixin Liu
2023-12-13  8:48   ` Christoph Hellwig
2023-12-13 13:05     ` Guixin Liu
2023-12-13 13:52       ` Sagi Grimberg
2023-12-13 23:05 ` [PATCH 0/5] *** bugfixes and code refactoring for nvme target *** 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=1702449172-8920-2-git-send-email-kanie@linux.alibaba.com \
    --to=kanie@linux.alibaba.com \
    --cc=hch@lst.de \
    --cc=kch@nvidia.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.