From: Baolu Lu <baolu.lu@linux.intel.com>
To: Lizhi Hou <lizhi.hou@amd.com>,
joro@8bytes.org, will@kernel.org, robin.murphy@arm.com,
yi.l.liu@intel.com
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
vasant.hegde@amd.com
Subject: Re: [PATCH V2] iommu/sva: Fix crash in iommu_sva_unbind_device()
Date: Fri, 6 Mar 2026 13:35:22 +0800 [thread overview]
Message-ID: <5e73da9e-7f3c-43a8-b437-3d9942a6fcc6@linux.intel.com> (raw)
In-Reply-To: <20260305061842.3953885-1-lizhi.hou@amd.com>
On 3/5/26 14:18, Lizhi Hou wrote:
> domain->mm->iommu_mm can be freed by iommu_domain_free():
> iommu_domain_free()
> mmdrop()
> __mmdrop()
> mm_pasid_drop()
> After iommu_domain_free() returns, accessing domain->mm->iommu_mm may
> dereference a freed mm structure, leading to a crash.
>
> Fix this by moving the code that accesses domain->mm->iommu_mm to before
> the call to iommu_domain_free().
>
> Fixes: e37d5a2d60a3 ("iommu/sva: invalidate stale IOTLB entries for kernel address space")
> Signed-off-by: Lizhi Hou<lizhi.hou@amd.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
next prev parent reply other threads:[~2026-03-06 5:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 6:18 [PATCH V2] iommu/sva: Fix crash in iommu_sva_unbind_device() Lizhi Hou
2026-03-06 5:35 ` Baolu Lu [this message]
2026-03-06 9:55 ` Vasant Hegde
2026-03-06 10:11 ` Yi Liu
2026-03-12 13:41 ` Jason Gunthorpe
2026-03-17 13:00 ` Jörg Rödel
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=5e73da9e-7f3c-43a8-b437-3d9942a6fcc6@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=robin.murphy@arm.com \
--cc=vasant.hegde@amd.com \
--cc=will@kernel.org \
--cc=yi.l.liu@intel.com \
/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