]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: fix error unwind in nvme_map_data
authorChristoph Hellwig <hch@lst.de>
Wed, 20 Jan 2021 08:35:01 +0000 (09:35 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 20 Jan 2021 17:56:33 +0000 (18:56 +0100)
commit2cfc70e9501d909dcd38e2c7b5e54674d745c5ea
tree3c7970231b1ffd86791daf4d0bee1ab34299e2f3
parent2b579a019e50eb89bddf422c9984cefd4367ff16
nvme-pci: fix error unwind in nvme_map_data

Properly unwind step by step using refactored helpers from nvme_unmap_data
to avoid a potential double dma_unmap on a mapping failure.

Fixes: 6b5fa2f5e5b9 ("nvme-pci: merge nvme_free_iod into nvme_unmap_data")
Reported-by: Marc Orr <marcorr@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Marc Orr <marcorr@google.com>
drivers/nvme/host/pci.c