summaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-10-15 21:25:15 +0300
committerDavid Woodhouse <David.Woodhouse@intel.com>2015-10-15 21:16:47 +0100
commit95fb6144bb2222b4c0189e76c1aae006b0a02bff (patch)
treec0f5ba55cf649ac9af3ace42fe2432c549d13b76 /drivers/iommu
parent26322ab55aa90717c7e4bdbd8cf60a70854636f5 (diff)
downloadlinux-95fb6144bb2222b4c0189e76c1aae006b0a02bff.tar.bz2
iommu/vt-d: shift wrapping bug in prq_event_thread()
The "req->addr" variable is a bit field declared as "u64 addr:52;". The "address" variable is a u64. We need to cast "req->addr" to a u64 before the shift or the result is truncated to 52 bits. Fixes: a222a7f0bb6c ('iommu/vt-d: Implement page request handling') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/intel-svm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c
index b7e923aae4d8..99a78030857b 100644
--- a/drivers/iommu/intel-svm.c
+++ b/drivers/iommu/intel-svm.c
@@ -490,7 +490,7 @@ static irqreturn_t prq_event_thread(int irq, void *d)
req = &iommu->prq[head / sizeof(*req)];
result = QI_RESP_FAILURE;
- address = req->addr << PAGE_SHIFT;
+ address = (u64)req->addr << PAGE_SHIFT;
if (!req->pasid_present) {
pr_err("%s: Page request without PASID: %08llx %08llx\n",
iommu->name, ((unsigned long long *)req)[0],