[PATCHv2] nvme-pci: fix dma mapping leak on data setup error

Keith Busch kbusch at kernel.org
Wed May 20 10:39:04 PDT 2026


On Tue, May 19, 2026 at 03:33:29PM -0700, Keith Busch wrote:
> We're leaking the initial DMA mapping during iteration if we fail to
> allocate the tracking descriptor for both PRP and SGL. Unmap the
> iterator directly; we can't use the existing unmap helper because it
> depends on the tracking descriptor being successfully allocated.

I hate to do another rapid respin here, but I gotta do it. The metadata
sgl setup also can leak for the same reason, so need to close that one
too. And there's also a leak for a P2P case that needs fixing. So v3
coming shortly.



More information about the Linux-nvme mailing list