lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56E3284F.3070801@ti.com>
Date:	Fri, 11 Mar 2016 14:19:27 -0600
From:	Nishanth Menon <nm@...com>
To:	Peter Ujfalusi <peter.ujfalusi@...com>, <t-kristo@...com>,
	<mturquette@...libre.com>, <sboyd@...eaurora.org>
CC:	<linux-omap@...r.kernel.org>, <linux-clk@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <tony@...mide.com>
Subject: Re: [PATCH] clk: ti: dra7-atl-clock: Fix of_node reference counting

On 03/11/2016 08:13 AM, Peter Ujfalusi wrote:
> of_find_node_by_name() will call of_node_put() on the node so we need to
> get it first to avoid warnings.
> The cfg_node needs to be put after we have finished processing the
> properties.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
> ---
>  drivers/clk/ti/clk-dra7-atl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c
> index 2e14dfb588f4..c77333230bdf 100644
> --- a/drivers/clk/ti/clk-dra7-atl.c
> +++ b/drivers/clk/ti/clk-dra7-atl.c
> @@ -265,6 +265,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
>  
>  		/* Get configuration for the ATL instances */
>  		snprintf(prop, sizeof(prop), "atl%u", i);
> +		of_node_get(node);
>  		cfg_node = of_find_node_by_name(node, prop);
>  		if (cfg_node) {
>  			ret = of_property_read_u32(cfg_node, "bws",
> @@ -278,6 +279,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
>  				atl_write(cinfo, DRA7_ATL_AWSMUX_REG(i),
>  					  cdesc->aws);
>  			}
> +			of_node_put(cfg_node);
>  		}
>  
>  		cdesc->probed = true;
> 

Tested-by: Nishanth Menon <nm@...com>

-- 
Regards,
Nishanth Menon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ