]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
iommu/omap: Remove iopgtable_clear_entry_all() from driver remove
authorSuman Anna <s-anna@ti.com>
Mon, 4 Apr 2016 22:46:18 +0000 (17:46 -0500)
committerJoerg Roedel <jroedel@suse.de>
Tue, 5 Apr 2016 15:53:19 +0000 (17:53 +0200)
The function iopgtable_clear_entry_all() is used for clearing all
the page table entries. These entries are neither created nor
initialized during the OMAP IOMMU driver probe, and are managed
only when a client device attaches to the IOMMU. So, there is no
need to invoke this function on a driver remove.

Removing this fixes a NULL pointer dereference crash if the IOMMU
device is unbound from the driver with no client device attached
to the IOMMU device.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/omap-iommu.c

index 3dc5b65f3990d774e648376f8e814a4eb12f3d5f..c05d48f88596bf803159529b3a4509d23d344bb6 100644 (file)
@@ -987,7 +987,6 @@ static int omap_iommu_remove(struct platform_device *pdev)
 {
        struct omap_iommu *obj = platform_get_drvdata(pdev);
 
-       iopgtable_clear_entry_all(obj);
        omap_iommu_debugfs_remove(obj);
 
        pm_runtime_disable(obj->dev);