[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0fa7ddfa-cd65-583e-a83f-4cbcd4e7337f@linux.ibm.com>
Date: Tue, 7 Sep 2021 15:01:30 -0700
From: Tyrel Datwyler <tyreld@...ux.ibm.com>
To: Xu Wang <vulab@...as.ac.cn>, mpe@...erman.id.au,
benh@...nel.crashing.org, paulus@...ba.org, bhelgaas@...gle.com
Cc: linux-pci@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pci/hotplug/pnv-php: Remove probable double put
On 9/7/21 1:59 AM, Xu Wang wrote:
> Device node iterators put the previous value of the index variable,
> so an explicit put causes a double put.
>
> Signed-off-by: Xu Wang <vulab@...as.ac.cn>
> ---
> drivers/pci/hotplug/pnv_php.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c
> index 04565162a449..ed4d1a2c3f22 100644
> --- a/drivers/pci/hotplug/pnv_php.c
> +++ b/drivers/pci/hotplug/pnv_php.c
> @@ -158,7 +158,6 @@ static void pnv_php_detach_device_nodes(struct device_node *parent)
> for_each_child_of_node(parent, dn) {
> pnv_php_detach_device_nodes(dn);
>
> - of_node_put(dn);
> of_detach_node(dn);
Are you sure this is a double put? This looks to me like its meant to drive tear
down of the device by putting a long term reference and not the short term get
that is part of the iterator.
-Tyrel
> }
> }
>
Powered by blists - more mailing lists