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: <9ec3ef0c-b931-6a1e-e1ed-5538c42df830@cogentembedded.com>
Date:   Thu, 22 Nov 2018 11:28:21 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Yangtao Li <tiny.windzz@...il.com>, davem@...emloft.net,
        yuehaibing@...wei.com
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: amd: add of_node_put()

Hello!

On 21.11.2018 15:58, Yangtao Li wrote:

> of_find_node_by_path() acquires a reference to the node
> returned by it and that reference needs to be dropped by its caller.
> bl_idle_init() doesn't do that, so fix it.

    Again, maybe sparc_lance_probe_one() doesn't do that?

> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
> ---
>   drivers/net/ethernet/amd/sunlance.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c
> index b4fc0ed5bce8..9d4899826823 100644
> --- a/drivers/net/ethernet/amd/sunlance.c
> +++ b/drivers/net/ethernet/amd/sunlance.c
> @@ -1419,7 +1419,7 @@ static int sparc_lance_probe_one(struct platform_device *op,
>   
>   			prop = of_get_property(nd, "tpe-link-test?", NULL);
>   			if (!prop)
> -				goto no_link_test;
> +				goto node_put;
>   
>   			if (strcmp(prop, "true")) {
>   				printk(KERN_NOTICE "SunLance: warning: overriding option "
> @@ -1428,6 +1428,8 @@ static int sparc_lance_probe_one(struct platform_device *op,
>   				       "to ecd@...net.be\n");
>   				auxio_set_lte(AUXIO_LTE_ON);
>   			}
> +node_put:
> +			of_node_put(nd);
>   no_link_test:
>   			lp->auto_select = 1;
>   			lp->tpe = 0;

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ