summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLizhi Hou <lizhi.hou@amd.com>2026-03-05 09:18:42 +0300
committerJoerg Roedel <joerg.roedel@amd.com>2026-03-17 16:00:36 +0300
commit06e14c36e20b48171df13d51b89fe67c594ed07a (patch)
treed9e31bb7d87030cf953ed376a07d1fadd7b7fa23 /include
parent45c6a2dc7ec8339052666b06065c521a10cc29bb (diff)
downloadlinux-06e14c36e20b48171df13d51b89fe67c594ed07a.tar.xz
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 'include')
0 files changed, 0 insertions, 0 deletions