summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2026-02-04 06:29:11 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-02-11 13:41:59 +0100
commitf3ed399e9aa6f36e92d2d0fe88b387915e9705fe (patch)
treefe7676466a07ea4cadc1ebafcfe2a3aeea4d9295 /scripts/basic
parent3c58f6121863c1e622f1bb6b7b77cedd6f820eee (diff)
nvme-pci: handle changing device dma map requirements
[ Upstream commit 071be3b0b6575d45be9df9c5b612f5882bfc5e88 ] The initial state of dma_needs_unmap may be false, but change to true while mapping the data iterator. Enabling swiotlb is one such case that can change the result. The nvme driver needs to save the mapped dma vectors to be unmapped later, so allocate as needed during iteration rather than assume it was always allocated at the beginning. This fixes a NULL dereference from accessing an uninitialized dma_vecs when the device dma unmapping requirements change mid-iteration. Fixes: b8b7570a7ec8 ("nvme-pci: fix dma unmapping when using PRPs and not using the IOVA mapping") Link: https://lore.kernel.org/linux-nvme/20260202125738.1194899-1-pradeep.pragallapati@oss.qualcomm.com/ Reported-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions