From: Greg KH <gregkh@linuxfoundation.org>
To: avinash pal <avinashpal441@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Lu Baolu <baolu.lu@linux.intel.com>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH stable 6.12 0/2] iommu/vt-d+dma: fix stale DMA PTE WARN on IOVA reuse (regression v6.12.75)
Date: Thu, 23 Apr 2026 13:10:11 +0200 [thread overview]
Message-ID: <2026042303-untreated-lubricate-646b@gregkh> (raw)
In-Reply-To: <20260423100904.5966-1-avinashpal441@gmail.com>
On Thu, Apr 23, 2026 at 03:39:02PM +0530, avinash pal wrote:
> Two-patch series addressing the stale-DMA-PTE WARN_ON regression that
> hits kernels 6.12.75 and 6.12.76 when Intel IOMMU is enabled.
>
> Bugzilla : https://bugzilla.kernel.org/show_bug.cgi?id=221389
> Unaffected: v6.12.74 (confirmed: Giovanni Pancotti, 2026-04-22)
> Affected : v6.12.76 (WARN on ATA/SCSI DMA workloads)
> Workaround: intel_iommu=off
>
> Root cause
> ==========
> The lazy-flush path in __iommu_dma_unmap_sg() releases an IOVA back to
> the allocator via free_iova_fast() before iommu_iotlb_sync() drains the
> hardware TLB. A concurrent map() on the same domain receives the same
> IOVA and hits a live PTE in __domain_mapping():
>
> CPU 0 (unmap, lazy path) CPU 1 (concurrent map)
> ────────────────────────── ───────────────────────────────
> iommu_unmap(iova)
> free_iova_fast(iova) ← live
> alloc_iova_fast() → same iova
> __domain_mapping()
> dma_pte_present() == true
> WARN_ON_ONCE() ← hit
>
> Patches
> =======
> 1/2 iommu/vt-d: fail map loudly on stale DMA PTE
> - Replaces bare WARN(1,...) with pr_err_ratelimited + WARN_ON_ONCE
> - Prints vPFN + old PTE value for debugging
> - Returns -EEXIST; no silent double-map
>
> 2/2 iommu/dma: sync IOTLB before releasing IOVA on sg unmap
> - Adds iommu_iotlb_sync() before free_iova_fast() on lazy path
> - Closes the race window; strict-mode path already does this
>
> ACTION NEEDED by reviewer: run
> git log v6.12.74..v6.12.76 -- drivers/iommu/dma-iommu.c
> to identify the offending commit for the Fixes: tag in patch 2/2.
>
> avinash pal (2):
> iommu/vt-d: fail map loudly on stale DMA PTE
> iommu/dma: sync IOTLB before releasing IOVA on sg unmap
>
> drivers/iommu/dma-iommu.c | 9 +++++++
> drivers/iommu/intel/iommu.c | 50 ++++++++++++++++++++++++++++---------
> 2 files changed, 47 insertions(+), 12 deletions(-)
>
>
> base-commit: 444b39ef6108313e8452010b22aaba588e8fb92b
> --
> 2.53.0
>
>
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
next prev parent reply other threads:[~2026-04-23 11:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 10:09 [PATCH stable 6.12 0/2] iommu/vt-d+dma: fix stale DMA PTE WARN on IOVA reuse (regression v6.12.75) avinash pal
2026-04-23 10:09 ` [PATCH stable 6.12 1/2] iommu/vt-d: fail map loudly on stale DMA PTE avinash pal
2026-04-23 10:09 ` [PATCH stable 6.12 2/2] iommu/dma: sync IOTLB before releasing IOVA on sg unmap avinash pal
2026-04-23 11:10 ` Greg KH [this message]
2026-04-23 11:34 ` [PATCH stable 6.12 0/2] iommu/vt-d+dma: fix stale DMA PTE WARN on IOVA reuse (regression v6.12.75) Robin Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026042303-untreated-lubricate-646b@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=avinashpal441@gmail.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=stable@vger.kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox