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]
Date:   Thu, 22 Sep 2022 01:47:23 +0300
From:   Yevhen Orlov <yevhen.orlov@...ision.eu>
To:     Liang He <windhl@....com>, tchornyi@...vell.com,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, linux@...linux.org.uk, netdev@...r.kernel.org
Cc:     taras.chornyi@...ision.eu, oleksandr.mazur@...ision.eu
Subject: Re: [PATCH] net: marvell: Fix refcounting bugs in
 prestera_port_sfp_bind()

On Wed, Sep 21, 2022 at 09:32:45PM +0800, Liang He wrote:
> In prestera_port_sfp_bind(), there are two refcounting bugs:
> (1) we should call of_node_get() before of_find_node_by_name() as
> it will automaitcally decrease the refcount of 'from' argument;
> (2) we should call of_node_put() for the break of the iteration
> for_each_child_of_node() as it will automatically increase and
> decrease the 'child'.
> 
> Fixes: 52323ef75414 ("net: marvell: prestera: add phylink support")
> Signed-off-by: Liang He <windhl@....com>
> ---
>  it will be safe to call of_node_put() at the end of the function as
> the of_node_put() can handle NULL.
> 
>  drivers/net/ethernet/marvell/prestera/prestera_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Reviewed-by: Yevhen Orlov <yevhen.orlov@...ision.eu>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ