]> www.infradead.org Git - users/willy/xarray.git/commit
nvme-pci: add missing condition check for existence of mapped data
authorLeon Romanovsky <leonro@nvidia.com>
Wed, 24 Jul 2024 10:31:14 +0000 (13:31 +0300)
committerKeith Busch <kbusch@kernel.org>
Thu, 25 Jul 2024 14:20:54 +0000 (07:20 -0700)
commitc31fad1470389666ac7169fe43aa65bf5b7e2cfd
treec2980209a5830fbfc9d5025d5d5c409cf3ac7fbf
parent415fb383ec2bbe4d4bb1a1b5593cd67eb058f1de
nvme-pci: add missing condition check for existence of mapped data

nvme_map_data() is called when request has physical segments, hence
the nvme_unmap_data() should have same condition to avoid dereference.

Fixes: 4aedb705437f ("nvme-pci: split metadata handling from nvme_map_data / nvme_unmap_data")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nitesh Shetty <nj.shetty@samsung.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/pci.c