aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/arm-smmu.c
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2016-11-02 13:31:32 -0400
committerJoerg Roedel <jroedel@suse.de>2016-11-08 08:46:41 -0500
commit3c117b543528b0d25801bd75444037dd0fcd2b8d (patch)
tree301a1ee2e46951464c3ac173f45890ccd7787933 /drivers/iommu/arm-smmu.c
parentec615f43d3b61edcfdc4d8d1f672be1059573d1b (diff)
iommu/arm-smmu: Check that iommu_fwspecs are ours
We seem to have forgotten to check that iommu_fwspecs actually belong to us before we go ahead and dereference their private data. Oops. Fixes: 021bb8420d44 ("iommu/arm-smmu: Wire up generic configuration support") Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/arm-smmu.c')
-rw-r--r--drivers/iommu/arm-smmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 3af7f8f62d0a..d388629ab990 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1400,7 +1400,7 @@ static int arm_smmu_add_device(struct device *dev)
1400 fwspec = dev->iommu_fwspec; 1400 fwspec = dev->iommu_fwspec;
1401 if (ret) 1401 if (ret)
1402 goto out_free; 1402 goto out_free;
1403 } else if (fwspec) { 1403 } else if (fwspec && fwspec->ops == &arm_smmu_ops) {
1404 smmu = arm_smmu_get_by_node(to_of_node(fwspec->iommu_fwnode)); 1404 smmu = arm_smmu_get_by_node(to_of_node(fwspec->iommu_fwnode));
1405 } else { 1405 } else {
1406 return -ENODEV; 1406 return -ENODEV;