mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
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: a222a7f0bb
('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>
This commit is contained in:
parent
26322ab55a
commit
95fb6144bb
1 changed files with 1 additions and 1 deletions
|
@ -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],
|
||||
|
|
Loading…
Reference in a new issue