diff options
| author | 2026-03-04 22:18:42 -0800 | |
|---|---|---|
| committer | 2026-03-17 14:00:36 +0100 | |
| commit | 06e14c36e20b48171df13d51b89fe67c594ed07a (patch) | |
| tree | d9e31bb7d87030cf953ed376a07d1fadd7b7fa23 /tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com | |
| parent | iommu/io-pgtable: fix all kernel-doc warnings in io-pgtable.h (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/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
