iommu/vt-d: Fix NULL pointer dereference in prq_event_thread()
authorLu Baolu <baolu.lu@linux.intel.com>
Mon, 5 Nov 2018 02:18:58 +0000 (10:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:16:09 +0000 (09:16 +0100)
commit093255da5688347ddaa5f118c07b2873f542acdd
treef844c35ef944199fde84011fa892249722a4ae96
parentf84263bfd8015da1a48a9f7ab4aaacb1b105086c
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 <ashok.raj@intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Sohil Mehta <sohil.mehta@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Fixes: a222a7f0bb6c9 'iommu/vt-d: Implement page request handling'
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/intel-svm.c