Re: WARNING: drivers/iommu/io-pgtable-arm.c:639

From: Robin Murphy
Date: Tue Dec 09 2025 - 12:36:25 EST


On 2025-12-09 5:29 pm, Chaitanya Kulkarni wrote:
On 12/9/25 03:50, Robin Murphy wrote:
On 2025-12-09 11:43 am, Sebastian Ott wrote:
Hi,

got the following warning after a kernel update on Thurstday, leading
to a
panic and fs corruption. I didn't capture the first warning but I'm
pretty
sure it was the same. It's reproducible but I didn't bisect since it
borked my fs. The only hint I can give is that v6.18 worked. Is this a
known issue? Anything I should try?

nvme_unmap_data() is attempting to unmap an IOVA that was never
mapped, or has already been unmapped by someone else. That's a usage bug.

Thanks,
Robin.

Ankit A. also reported this.

Apart from unmapping, by any chance do we need this ?

diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c
index e6626004b323..05d63fe92e43 100644
--- a/drivers/iommu/io-pgtable-arm.c
+++ b/drivers/iommu/io-pgtable-arm.c
@@ -637,7 +637,7 @@ static size_t __arm_lpae_unmap(struct arm_lpae_io_pgtable *data,
pte = READ_ONCE(*ptep);
if (!pte) {
WARN_ON(!(data->iop.cfg.quirks & IO_PGTABLE_QUIRK_NO_WARN));
- return -ENOENT;
+ return 0;
}
/* If the size matches this level, we're in the right place */

Oh, indeed - I also happened to notice that the other week and was intending to write up a fix, but apparently I completely forgot about it already :(

If you're happy to write that up and send a proper patch, please do - otherwise I'll try to get it done before I forget again...

Thanks,
Robin.