lkml.org 
[lkml]   [2017]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device
    Date
    From: Joerg Roedel <jroedel@suse.de>

    Don't leave a stale pointer in case the device continues to
    exist for some more time.

    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    ---
    drivers/iommu/omap-iommu.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
    index 45df5c8..04b3718 100644
    --- a/drivers/iommu/omap-iommu.c
    +++ b/drivers/iommu/omap-iommu.c
    @@ -1252,6 +1252,7 @@ static void omap_iommu_remove_device(struct device *dev)
    if (!dev->of_node || !arch_data)
    return;

    + dev->archdata.iommu = NULL;
    kfree(arch_data);
    }

    --
    1.9.1
    \
     
     \ /
      Last update: 2017-03-31 14:12    [W:4.398 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site