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: <20220301162950.GA13091@alpha.franken.de>
Date:   Tue, 1 Mar 2022 17:29:50 +0100
From:   Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To:     Hangyu Hua <hbh25y@...il.com>
Cc:     john@...ozen.org, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mips: ralink: fix a refcount leak in ill_acc_of_setup()

On Mon, Feb 28, 2022 at 03:35:37PM +0800, Hangyu Hua wrote:
> of_node_put(np) needs to be called when pdev == NULL.
> 
> Signed-off-by: Hangyu Hua <hbh25y@...il.com>
> ---
>  arch/mips/ralink/ill_acc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/mips/ralink/ill_acc.c b/arch/mips/ralink/ill_acc.c
> index 115a69fc20ca..f395ae218470 100644
> --- a/arch/mips/ralink/ill_acc.c
> +++ b/arch/mips/ralink/ill_acc.c
> @@ -61,6 +61,7 @@ static int __init ill_acc_of_setup(void)
>  	pdev = of_find_device_by_node(np);
>  	if (!pdev) {
>  		pr_err("%pOFn: failed to lookup pdev\n", np);
> +		of_node_put(np);
>  		return -EINVAL;
>  	}
>  
> -- 
> 2.25.1

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ