iommu/omap: Check for valid archdata in attach_dev
authorSuman Anna <s-anna@ti.com>
Thu, 4 Sep 2014 22:27:29 +0000 (17:27 -0500)
committerJoerg Roedel <jroedel@suse.de>
Fri, 5 Sep 2014 13:31:05 +0000 (15:31 +0200)
commite3f595b9039c888016211c710eb1f58b3f60f809
treeaff1744f04e68d4c75b471a135b9972c5e209b19
parent69e273c0b0a3c337a521d083374c918dc52c666f
iommu/omap: Check for valid archdata in attach_dev

Any device requiring to be attached to an iommu_domain must have
valid archdata containing the necessary iommu information, which
is SoC-specific. Add a check in the omap_iommu_attach_dev to make
sure that the device has valid archdata before accessing
different SoC-specific fields of the archdata. This prevents a
NULL pointer dereference on any misconfigured devices.

Signed-off-by: Suman Anna <s-anna@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/omap-iommu.c
This page took 0.02524 seconds and 5 git commands to generate.