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] [day] [month] [year] [list]
Message-ID: <859b3e14-27ee-2dba-9876-1389927b4cb4@amd.com>
Date:   Wed, 29 Jun 2022 14:43:26 +0200
From:   Michal Simek <michal.simek@....com>
To:     Miaoqian Lin <linmq006@...il.com>,
        Russell King <linux@...linux.org.uk>,
        Michal Simek <michal.simek@...inx.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cpufreq: zynq: Fix refcount leak in zynq_get_revision



On 6/5/22 10:28, Miaoqian Lin wrote:
> of_find_compatible_node() returns a node pointer with refcount
> incremented, we should use of_node_put() on it when done.
> Add missing of_node_put() to avoid refcount leak.
> 
> Fixes: 00f7dc636366 ("ARM: zynq: Add support for SOC_BUS")
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
> ---
>   arch/arm/mach-zynq/common.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
> index e1ca6a5732d2..15e8a321a713 100644
> --- a/arch/arm/mach-zynq/common.c
> +++ b/arch/arm/mach-zynq/common.c
> @@ -77,6 +77,7 @@ static int __init zynq_get_revision(void)
>   	}
>   
>   	zynq_devcfg_base = of_iomap(np, 0);
> +	of_node_put(np);
>   	if (!zynq_devcfg_base) {
>   		pr_err("%s: Unable to map I/O memory\n", __func__);
>   		return -1;

Applied.
M

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ