Commit 19c60745 authored by Lu Baolu's avatar Lu Baolu Committed by Greg Kroah-Hartman

iommu/vt-d: Fix NULL pointer dereference in prq_event_thread()

[ Upstream commit 19ed3e2dd8549c1a34914e8dad01b64e7837645a ]

When handling page request without pasid event, go to "no_pasid"
branch instead of "bad_req". Otherwise, a NULL pointer deference
will happen there.

Cc: Ashok Raj <>
Cc: Jacob Pan <>
Cc: Sohil Mehta <>
Signed-off-by: default avatarLu Baolu <>
Fixes: a222a7f0 'iommu/vt-d: Implement page request handling'
Signed-off-by: default avatarJoerg Roedel <>
Signed-off-by: default avatarSasha Levin <>
parent b49bb7d4
......@@ -558,7 +558,7 @@ static irqreturn_t prq_event_thread(int irq, void *d)
pr_err("%s: Page request without PASID: %08llx %08llx\n",
iommu->name, ((unsigned long long *)req)[0],
((unsigned long long *)req)[1]);
goto bad_req;
goto no_pasid;
if (!svm || svm->pasid != req->pasid) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment