projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
973b546
)
iommu/vt-d: Clear pasid table entry when memory unbound
author
Lu Baolu
<baolu.lu@linux.intel.com>
Fri, 3 Nov 2017 16:51:34 +0000
(10:51 -0600)
committer
Alex Williamson
<alex.williamson@redhat.com>
Fri, 3 Nov 2017 16:51:34 +0000
(10:51 -0600)
In intel_svm_unbind_mm(), pasid table entry must be cleared during
svm free. Otherwise, hardware may be set up with a wild pointer.
Suggested-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/iommu/intel-svm.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/intel-svm.c
b/drivers/iommu/intel-svm.c
index 43280ca282df475464b81cb6a559bcbe369cfc6f..ed1cf7c5a43ba33cc04ff32d1c88efcbb49bdbde 100644
(file)
--- a/
drivers/iommu/intel-svm.c
+++ b/
drivers/iommu/intel-svm.c
@@
-458,6
+458,8
@@
int intel_svm_unbind_mm(struct device *dev, int pasid)
kfree_rcu(sdev, rcu);
if (list_empty(&svm->devs)) {
+ svm->iommu->pasid_table[svm->pasid].val = 0;
+ wmb();
idr_remove(&svm->iommu->pasid_idr, svm->pasid);
if (svm->mm)