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  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]
Date:   Wed, 02 Sep 2020 15:41:44 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     dan.carpenter@...cle.com
Cc:     ulli.kroll@...glemail.com, wanghai38@...wei.com,
        linus.walleij@...aro.org, kuba@...nel.org, mirq-linux@...e.qmqm.pl,
        netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net] net: gemini: Fix another missing
 clk_disable_unprepare() in probe

From: Dan Carpenter <dan.carpenter@...cle.com>
Date: Wed, 2 Sep 2020 14:56:31 +0300

> We recently added some calls to clk_disable_unprepare() but we missed
> the last error path if register_netdev() fails.
> 
> I made a couple cleanups so we avoid mistakes like this in the future.
> First I reversed the "if (!ret)" condition and pulled the code in one
> indent level.  Also, the "port->netdev = NULL;" is not required because
> "port" isn't used again outside this function so I deleted that line.
> 
> Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit ethernet")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

Applied and queued up for -stable, thanks.

Unrelated to your patch but...

>  	ret = register_netdev(netdev);
 ...
> +	ret = gmac_setup_phy(netdev);

Should we really be setting up the PHY after registering the netdev?

The moment we register it, entities can try to bring the interface up
and shouldn't we have the PHY bits all squared away before that?

Powered by blists - more mailing lists