* [PATCH] nvmet: nvmet_sq_init(): fix use of uninitialized variable
@ 2025-05-09 23:59 Wilfred Mallawa
2025-05-10 0:10 ` Keith Busch
2025-05-12 5:24 ` Christoph Hellwig
0 siblings, 2 replies; 4+ messages in thread
From: Wilfred Mallawa @ 2025-05-09 23:59 UTC (permalink / raw)
To: linux-nvme
Cc: linux-kernel, Christoph Hellwig, Sagi Grimberg,
Chaitanya Kulkarni, Damien Le Moal, Alistair Francis,
Wilfred Mallawa, kernel test robot
From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
This fixes a bug where an uninitialized return value is used in
nvmet_sq_init().
Fixes: 206372d7c565 ("nvmet: support completion queue sharing")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505091619.QFU1fxsd-lkp@intel.com/
Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
---
drivers/nvme/target/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 042039011d7c..e30545586302 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -1012,7 +1012,7 @@ int nvmet_sq_init(struct nvmet_sq *sq, struct nvmet_cq *cq)
int ret;
if (!nvmet_cq_get(cq))
- return ret;
+ return -EINVAL;
ret = percpu_ref_init(&sq->ref, nvmet_sq_free, 0, GFP_KERNEL);
if (ret) {
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] nvmet: nvmet_sq_init(): fix use of uninitialized variable
2025-05-09 23:59 [PATCH] nvmet: nvmet_sq_init(): fix use of uninitialized variable Wilfred Mallawa
@ 2025-05-10 0:10 ` Keith Busch
2025-05-12 5:24 ` Christoph Hellwig
1 sibling, 0 replies; 4+ messages in thread
From: Keith Busch @ 2025-05-10 0:10 UTC (permalink / raw)
To: Wilfred Mallawa
Cc: linux-nvme, linux-kernel, Christoph Hellwig, Sagi Grimberg,
Chaitanya Kulkarni, Damien Le Moal, Alistair Francis,
Wilfred Mallawa, kernel test robot
On Sat, May 10, 2025 at 09:59:05AM +1000, Wilfred Mallawa wrote:
> From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
>
> This fixes a bug where an uninitialized return value is used in
> nvmet_sq_init().
>
> Fixes: 206372d7c565 ("nvmet: support completion queue sharing")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202505091619.QFU1fxsd-lkp@intel.com/
> Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Thanks for tagging to report! Looks good.
Reviewed-by: Keith Busch <kbusch@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] nvmet: nvmet_sq_init(): fix use of uninitialized variable
2025-05-09 23:59 [PATCH] nvmet: nvmet_sq_init(): fix use of uninitialized variable Wilfred Mallawa
2025-05-10 0:10 ` Keith Busch
@ 2025-05-12 5:24 ` Christoph Hellwig
2025-05-12 6:01 ` Wilfred Mallawa
1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2025-05-12 5:24 UTC (permalink / raw)
To: Wilfred Mallawa
Cc: linux-nvme, linux-kernel, Christoph Hellwig, Sagi Grimberg,
Chaitanya Kulkarni, Damien Le Moal, Alistair Francis,
Wilfred Mallawa, kernel test robot
Thanks,
I've folded this into the original commit.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvmet: nvmet_sq_init(): fix use of uninitialized variable
2025-05-12 5:24 ` Christoph Hellwig
@ 2025-05-12 6:01 ` Wilfred Mallawa
0 siblings, 0 replies; 4+ messages in thread
From: Wilfred Mallawa @ 2025-05-12 6:01 UTC (permalink / raw)
To: hch
Cc: lkp@intel.com, Alistair Francis, sagi@grimberg.me,
linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
kch@nvidia.com, dlemoal@kernel.org
Great! Thanks Christoph!
Wilfred
On Mon, 2025-05-12 at 07:24 +0200, Christoph Hellwig wrote:
> Thanks,
>
> I've folded this into the original commit.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-12 6:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-09 23:59 [PATCH] nvmet: nvmet_sq_init(): fix use of uninitialized variable Wilfred Mallawa
2025-05-10 0:10 ` Keith Busch
2025-05-12 5:24 ` Christoph Hellwig
2025-05-12 6:01 ` Wilfred Mallawa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox