Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1615467

Re: [PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device

From Suman Anna <s-anna@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device
Date 2017-04-03 20:30 +0200
Message-ID <tseTN-21p-27@gated-at.bofh.it> (permalink)
References <tr3H3-4uB-3@gated-at.bofh.it> <tr3H4-4uB-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Joerg,

On 03/31/2017 07:10 AM, Joerg Roedel wrote:
> 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;

This can be squashed into Patch 2 to go alongside the matching change in
omap_iommu_attach_device().

regards
Suman

>  	kfree(arch_data);
>  }
>  
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] iommu/omap: Add support for iommu-groups and 'struct iommu_device' Joerg Roedel <joro@8bytes.org> - 2017-03-31 14:20 +0200
  [PATCH 5/5] iommu/omap: Add iommu-group support Joerg Roedel <joro@8bytes.org> - 2017-03-31 14:20 +0200
  [PATCH 1/5] iommu/omap: Move data structures to omap-iommu.h Joerg Roedel <joro@8bytes.org> - 2017-03-31 14:20 +0200
    Re: [PATCH 1/5] iommu/omap: Move data structures to omap-iommu.h Suman Anna <s-anna@ti.com> - 2017-04-03 19:30 +0200
  [PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device Joerg Roedel <joro@8bytes.org> - 2017-03-31 14:20 +0200
    Re: [PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in  omap_iommu_remove_device Suman Anna <s-anna@ti.com> - 2017-04-03 20:30 +0200
  [PATCH 4/5] iommu/omap: Make use of 'struct iommu_device' Joerg Roedel <joro@8bytes.org> - 2017-03-31 14:20 +0200
  Re: [PATCH 0/5] iommu/omap: Add support for iommu-groups and 'struct  iommu_device' Suman Anna <s-anna@ti.com> - 2017-04-03 19:20 +0200

csiph-web