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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 5 Apr 2019 13:26:45 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Wen Yang <wen.yang99@....com.cn>,
        linux-arm-kernel@...ts.infradead.org
Cc:     linux-kernel@...r.kernel.org, linux@...linux.org.uk,
        Russell King <linux@...linux.org.uk>,
        Wei Xu <xuwei5@...ilicon.com>, Yi Wang <wang.yi59@....com.cn>
Subject: Re: [PATCH v2 04/15] ARM: hisi: fix a leaked reference by adding
 missing of_node_put

> @@ -285,12 +286,14 @@  static int __init hip04_smp_init(void)
>  	if (!np_sctl)
>  		goto err;
>  	np_fab = of_find_compatible_node(NULL, NULL, "hisilicon,hip04-fabric");
> -	if (!np_fab)
> +	if (!np_fab) {
> +		of_node_put(np_sctl);
>  		goto err;

I suggest to adjust this source code place in a different way.

 	if (!np_fab)
+		goto put_sctl_node;


> +	}
>
>  	ret = memblock_reserve(hip04_boot_method[0], hip04_boot_method[1]);
>  	if (ret)
> -		goto err;
> +		goto err_put_node;

How do you think about to use the jump label “put_fab_node” instead?


>
>  	relocation = ioremap(hip04_boot_method[2], hip04_boot_method[3]);


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ