[PATCH] nvme: fix bogus kzalloc() return check in nvme_init_effects_log()

Keith Busch kbusch at kernel.org
Mon Jan 13 09:39:19 PST 2025


On Mon, Jan 13, 2025 at 10:30:06AM -0700, Jens Axboe wrote:
> nvme_init_effects_log() returns failure when kzalloc() is successful,
> which is obviously wrong and causes failures to boot. Correct the
> check.
> 
> Fixes: d4a95adeabc6 ("nvme: Add error path for xa_store in nvme_init_effects")
> Signed-off-by: Jens Axboe <axboe at kernel.dk>

Oops. Thanks for the fix

Reviewed-by: Keith Busch <kbusch at kernel.org>

Also applied to nvme-6.14, but feel free to take it directly to
block/for-6.14.

> Caused a boot failure on the first test system I tried. Not sure how
> this got this far without being seen...

I think we've a gap in our blktests for checking driver backward
compatibility. The devices we test against support the Effects log, so
we didn't see this fallback path for older spec revision devices tested
out.



More information about the Linux-nvme mailing list