diff options
author | Fenghua Yu <[email protected]> | 2021-08-28 15:06:21 +0800 |
---|---|---|
committer | Joerg Roedel <[email protected]> | 2021-09-09 13:18:06 +0200 |
commit | a21518cb23a3c7d49bafcb59862fd389fd829d4b (patch) | |
tree | b99e66045ca6ea37c562744731404ac39a7ce704 /net/lapb/lapb_timer.c | |
parent | eb03f2d2f6a4da25d286613717d10add9ce9f175 (diff) |
iommu/vt-d: Fix PASID leak in intel_svm_unbind_mm()
The mm->pasid will be used in intel_svm_free_pasid() after load_pasid()
during unbinding mm. Clearing it in load_pasid() will cause PASID cannot
be freed in intel_svm_free_pasid().
Additionally mm->pasid was updated already before load_pasid() during pasid
allocation. No need to update it again in load_pasid() during binding mm.
Don't update mm->pasid to avoid the issues in both binding mm and unbinding
mm.
Fixes: 4048377414162 ("iommu/vt-d: Use iommu_sva_alloc(free)_pasid() helpers")
Reported-and-tested-by: Dave Jiang <[email protected]>
Co-developed-by: Jacob Pan <[email protected]>
Signed-off-by: Jacob Pan <[email protected]>
Signed-off-by: Fenghua Yu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lu Baolu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions