All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvmet-passthru: propagate status from id override functions
@ 2024-06-12 14:02 Daniel Wagner
  2024-06-12 14:40 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daniel Wagner @ 2024-06-12 14:02 UTC (permalink / raw)
  To: Christoph Hellwig, Sagi Grimberg, Keith Busch
  Cc: linux-nvme, linux-kernel, Daniel Wagner

The id override functions return a status which is not propagated to the
caller.

Fixes: c1fef73f793b ("nvmet: add passthru code to process commands")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
While reading up on something else, I discovered this part and it looked a bit
sus. Only compile tested.
---
 drivers/nvme/target/passthru.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c
index bb4a69d538fd..f003782d4ecf 100644
--- a/drivers/nvme/target/passthru.c
+++ b/drivers/nvme/target/passthru.c
@@ -226,13 +226,13 @@ static void nvmet_passthru_execute_cmd_work(struct work_struct *w)
 	    req->cmd->common.opcode == nvme_admin_identify) {
 		switch (req->cmd->identify.cns) {
 		case NVME_ID_CNS_CTRL:
-			nvmet_passthru_override_id_ctrl(req);
+			status = nvmet_passthru_override_id_ctrl(req);
 			break;
 		case NVME_ID_CNS_NS:
-			nvmet_passthru_override_id_ns(req);
+			status = nvmet_passthru_override_id_ns(req);
 			break;
 		case NVME_ID_CNS_NS_DESC_LIST:
-			nvmet_passthru_override_id_descs(req);
+			status = nvmet_passthru_override_id_descs(req);
 			break;
 		}
 	} else if (status < 0)

---
base-commit: 6bfd66808f973cf1bb234e54d0cd51a15bba2996
change-id: 20240612-nvmet-passthru-fix-5754c63f2938

Best regards,
-- 
Daniel Wagner <dwagner@suse.de>



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

* Re: [PATCH] nvmet-passthru: propagate status from id override functions
  2024-06-12 14:02 [PATCH] nvmet-passthru: propagate status from id override functions Daniel Wagner
@ 2024-06-12 14:40 ` Christoph Hellwig
  2024-06-12 14:58 ` Chaitanya Kulkarni
  2024-06-12 17:56 ` Keith Busch
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2024-06-12 14:40 UTC (permalink / raw)
  To: Daniel Wagner
  Cc: Christoph Hellwig, Sagi Grimberg, Keith Busch, linux-nvme,
	linux-kernel

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH] nvmet-passthru: propagate status from id override functions
  2024-06-12 14:02 [PATCH] nvmet-passthru: propagate status from id override functions Daniel Wagner
  2024-06-12 14:40 ` Christoph Hellwig
@ 2024-06-12 14:58 ` Chaitanya Kulkarni
  2024-06-12 17:56 ` Keith Busch
  2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2024-06-12 14:58 UTC (permalink / raw)
  To: Daniel Wagner, Christoph Hellwig, Sagi Grimberg, Keith Busch
  Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org

On 6/12/24 07:02, Daniel Wagner wrote:
> The id override functions return a status which is not propagated to the
> caller.
>
> Fixes: c1fef73f793b ("nvmet: add passthru code to process commands")
> Signed-off-by: Daniel Wagner<dwagner@suse.de>

thanks for the fix, looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck



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

* Re: [PATCH] nvmet-passthru: propagate status from id override functions
  2024-06-12 14:02 [PATCH] nvmet-passthru: propagate status from id override functions Daniel Wagner
  2024-06-12 14:40 ` Christoph Hellwig
  2024-06-12 14:58 ` Chaitanya Kulkarni
@ 2024-06-12 17:56 ` Keith Busch
  2 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2024-06-12 17:56 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Christoph Hellwig, Sagi Grimberg, linux-nvme, linux-kernel

On Wed, Jun 12, 2024 at 04:02:40PM +0200, Daniel Wagner wrote:
> The id override functions return a status which is not propagated to the
> caller.

Thanks, applied to nvme-6.10.


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

end of thread, other threads:[~2024-06-12 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-12 14:02 [PATCH] nvmet-passthru: propagate status from id override functions Daniel Wagner
2024-06-12 14:40 ` Christoph Hellwig
2024-06-12 14:58 ` Chaitanya Kulkarni
2024-06-12 17:56 ` Keith Busch

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.