diff options
| author | Lizhi Hou <lizhi.hou@amd.com> | 2026-03-04 22:18:42 -0800 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2026-03-17 14:00:36 +0100 |
| commit | 06e14c36e20b48171df13d51b89fe67c594ed07a (patch) | |
| tree | d9e31bb7d87030cf953ed376a07d1fadd7b7fa23 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux-stable.git | |
| parent | 45c6a2dc7ec8339052666b06065c521a10cc29bb (diff) | |
iommu/sva: Fix crash in iommu_sva_unbind_device()
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: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
