[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260128084958.GB9373@lst.de>
Date: Wed, 28 Jan 2026 09:49:58 +0100
From: Christoph Hellwig <hch@....de>
To: Roger Pau Monne <roger.pau@...rix.com>
Cc: xen-devel@...ts.xenproject.org, Jens Axboe <axboe@...nel.dk>,
Keith Busch <kbusch@...nel.org>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>
Subject: Re: [PATCH] nvme-pci: fix parameter order in nvme_free_sgls() call
On Tue, Jan 27, 2026 at 08:59:06PM +0100, Roger Pau Monne wrote:
> The call to nvme_free_sgls() in nvme_unmap_data() has the sg_list and sge
> parameters swapped. This wasn't noticed by the compiler because both share
> the same type. On a Xen PV hardware domain, and possibly any other
> architectures that takes that path, this leads to corruption of the NVMe
> contents.
>
> Fixes: f0887e2a52d4 ("nvme-pci: create common sgl unmapping helper")
> Signed-off-by: Roger Pau Monné <roger.pau@...rix.com>
> ---
> If possible it would be good for this to go in 6.19.0-rc8, as corruption of
> the root device as part of a kernel update is unexpected. Sadly 6.18
> already contained this issue, and no-one noticed, so its impact is limited?
This only affects non-IOMMU paths with a non-noop dma_unmap_phys.
So it is a very common setup, but very severe for those. Because of
that we should get into 6.19-rc and -stable ASAP.
The fix looks good:
Reviewed-by: Christoph Hellwig <hch@....de>
but maybe we can reword the subject to sound less harmless, e.g.:
nvme-pci: DMA unmap the correct regions in nvme_free_sgls
?
Powered by blists - more mailing lists