]> www.infradead.org Git - nvme.git/commit
nvme: Add error path for xa_store in nvme_init_effects
authorKeisuke Nishimura <keisuke.nishimura@inria.fr>
Mon, 16 Dec 2024 15:27:20 +0000 (16:27 +0100)
committerKeith Busch <kbusch@kernel.org>
Sun, 12 Jan 2025 22:11:29 +0000 (14:11 -0800)
commitd4a95adeabc6b5a39405e49c6d5ed14dd83682c4
tree61513dd862de05c5c1616790c226b140040659b1
parente4a0a3058de85bc623f1ba90eec68f239d0a11b2
nvme: Add error path for xa_store in nvme_init_effects

The xa_store() may fail due to memory allocation failure because there
is no guarantee that the index NVME_CSI_NVM is already used. This fix
introduces a new function to handle the error path.

Fixes: cc115cbe12d9 ("nvme: always initialize known command effects")
Signed-off-by: Keisuke Nishimura <keisuke.nishimura@inria.fr>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c