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]
Message-ID: <Y3zAGJhQVEnzQhAH@boxer>
Date:   Tue, 22 Nov 2022 13:27:04 +0100
From:   Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To:     Zhang Changzhong <zhangchangzhong@...wei.com>
CC:     Taras Chornyi <tchornyi@...vell.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Oleksandr Mazur <oleksandr.mazur@...ision.eu>,
        Yevhen Orlov <yevhen.orlov@...ision.eu>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] net: marvell: prestera: add missing
 unregister_netdev() in prestera_port_create()

On Tue, Nov 22, 2022 at 07:10:31PM +0800, Zhang Changzhong wrote:
> If prestera_port_sfp_bind() fails, unregister_netdev() should be called
> in error handling path.
> 
> Compile tested only.
> 
> Fixes: 52323ef75414 ("net: marvell: prestera: add phylink support")
> Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>

Makes sense and fixes commit is correct.
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>

> ---
>  drivers/net/ethernet/marvell/prestera/prestera_main.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c
> index 24f9d60..47796e4 100644
> --- a/drivers/net/ethernet/marvell/prestera/prestera_main.c
> +++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c
> @@ -746,6 +746,7 @@ static int prestera_port_create(struct prestera_switch *sw, u32 id)
>  	return 0;
>  
>  err_sfp_bind:
> +	unregister_netdev(dev);
>  err_register_netdev:
>  	prestera_port_list_del(port);
>  err_port_init:
> -- 
> 2.9.5
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ