iommu/vt-d: Fix NULL pointer dereference in page request error case
authorDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 15 Oct 2015 20:12:56 +0000 (21:12 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 15 Oct 2015 20:16:22 +0000 (21:16 +0100)
commit26322ab55aa90717c7e4bdbd8cf60a70854636f5
treec3917aaa63647b39f416393652ece849e50d9e02
parent5cec753709adf1a20c8b15edf8e5245cf4fd4e82
iommu/vt-d: Fix NULL pointer dereference in page request error case

Dan Carpenter pointed out an error path which could lead to us
dereferencing the 'svm' pointer after we know it to be NULL because the
PASID lookup failed. Fix that, and make it less likely to happen again.

Fixes: a222a7f0bb6c ('iommu/vt-d: Implement page request handling')
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/iommu/intel-svm.c