Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753890AbdDCS0y (ORCPT ); Mon, 3 Apr 2017 14:26:54 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:24532 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752367AbdDCS0x (ORCPT ); Mon, 3 Apr 2017 14:26:53 -0400 Subject: Re: [PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device To: Joerg Roedel , References: <1490962248-12602-1-git-send-email-joro@8bytes.org> <1490962248-12602-4-git-send-email-joro@8bytes.org> CC: , Joerg Roedel From: Suman Anna Message-ID: <4dd1662f-a1d6-282e-ba83-f4341b8ff312@ti.com> Date: Mon, 3 Apr 2017 13:25:58 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1490962248-12602-4-git-send-email-joro@8bytes.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 809 Lines: 33 Hi Joerg, On 03/31/2017 07:10 AM, Joerg Roedel wrote: > From: Joerg Roedel > > Don't leave a stale pointer in case the device continues to > exist for some more time. > > Signed-off-by: Joerg Roedel > --- > 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); > } > >