[RFC V2] iommu: correct group reference count

2015-11-08 Thread Peng Fan
The basic flow for iommu_group_for_dev is: iommu_group_get_for_dev |-> iommu_group_get : increase reference count by 1. return group; |-> ops->device_group : Init/increase reference count to/by 1. iommu_group_add_device : Increase reference count by

Re: [RFC] iommu: arm-smmu: correct reference count

2015-11-08 Thread Peng Fan
Hi Will, On Fri, Nov 06, 2015 at 12:23:39PM +, Will Deacon wrote: >On Wed, Nov 04, 2015 at 10:48:28AM +0800, Peng Fan wrote: >> On Tue, Nov 03, 2015 at 01:17:34PM +, Will Deacon wrote: >> >On Tue, Nov 03, 2015 at 08:59:17PM +0800, Peng Fan wrote: >> >> iommu_group_alloc will initialize