Thread (3 messages) 3 messages, 2 authors, 2014-09-04

RE: [PATCH] iommu/fsl: Fix warning resulting from adding PCI device twice

From: Varun Sethi <hidden>
Date: 2014-09-04 10:58:05
Also in: linux-iommu, lkml

-----Original Message-----
From: Joerg Roedel [mailto:joro@8bytes.org]
Sent: Thursday, September 04, 2014 3:44 PM
To: Sethi Varun-B16395
Cc: iommu@lists.linux-foundation.org; alex.williamson@redhat.com; Medve
Emilian-EMMEDVE1; linuxppc-dev@ozlabs.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/fsl: Fix warning resulting from adding PCI dev=
ice
twice
=20
On Thu, Sep 04, 2014 at 11:33:42AM +0530, Varun Sethi wrote:
quoted
+	if (!iommu_group_get(dev))
+		ret =3D iommu_group_add_device(group, dev);

 	iommu_group_put(group);
 	return ret;
=20
Doesn't this additional call to iommu_group_get take a reference to the
iommu_group that needs to be released?
Yes, you are right this would take a reference to the group that should be =
released. I need to add iommu_group_put for decrementing the reference coun=
t. Will post a new patch.

Thanks,
Varun
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help