Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753142AbbKCNRi (ORCPT ); Tue, 3 Nov 2015 08:17:38 -0500 Received: from foss.arm.com ([217.140.101.70]:55451 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751764AbbKCNRf (ORCPT ); Tue, 3 Nov 2015 08:17:35 -0500 Date: Tue, 3 Nov 2015 13:17:34 +0000 From: Will Deacon To: Peng Fan Cc: linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, joro@8bytes.org Subject: Re: [RFC] iommu: arm-smmu: correct reference count Message-ID: <20151103131734.GE14159@arm.com> References: <1446555557-3097-1-git-send-email-van.freenix@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446555557-3097-1-git-send-email-van.freenix@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1011 Lines: 24 On Tue, Nov 03, 2015 at 08:59:17PM +0800, Peng Fan wrote: > iommu_group_alloc will initialize the reference count for group to 1. > iommu_group_add_device also increase the group reference count, > if nothing bad happends. And we need to add iommu_group_put to > decrease the reference count for group. > > Signed-off-by: Peng Fan > Cc: Will Deacon > Cc: Joerg Roedel > --- > > Not sure whether my understanding is correct or not. I checked rockchip-iommu.c > exynos-iommu.c and fsl_pamu_domain.c, and they all have iommu_group_put after > iommu_group_add_device. Doesn't this pair up with the iommu_group_remove_device in arm_smmu_remove_device? Are you actually seeing an issue in practice? Will -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/