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: <20180919100701.GI30658@n2100.armlinux.org.uk>
Date:   Wed, 19 Sep 2018 11:07:01 +0100
From:   Russell King - ARM Linux <linux@...linux.org.uk>
To:     Antoine Tenart <antoine.tenart@...tlin.com>
Cc:     davem@...emloft.net, andrew@...n.ch, f.fainelli@...il.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        thomas.petazzoni@...tlin.com, maxime.chevallier@...tlin.com,
        gregory.clement@...tlin.com, miquel.raynal@...tlin.com,
        nadavh@...vell.com, stefanc@...vell.com, ymarkman@...vell.com,
        mw@...ihalf.com
Subject: Re: [PATCH net-next 1/3] net: phy: phylink: ensure the carrier is
 off when starting phylink

On Wed, Sep 19, 2018 at 11:39:31AM +0200, Antoine Tenart wrote:
> Phylink made an assumption about the carrier state being down when
> calling phylink_start(). If this assumption isn't satisfied, the
> internal phylink state could misbehave and a net device could end up not
> being functional.
> 
> This patch fixes this by explicitly calling netif_carrier_off() in
> phylink_start().
> 
> Signed-off-by: Antoine Tenart <antoine.tenart@...tlin.com>

Acked-by: Russell King <rmk+kernel@...linux.org.uk>

Thanks.

> ---
>  drivers/net/phy/phylink.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> index 3ba5cf2a8a5f..1d01e0c625a5 100644
> --- a/drivers/net/phy/phylink.c
> +++ b/drivers/net/phy/phylink.c
> @@ -901,6 +901,9 @@ void phylink_start(struct phylink *pl)
>  		    phylink_an_mode_str(pl->link_an_mode),
>  		    phy_modes(pl->link_config.interface));
>  
> +	/* Always set the carrier off */
> +	netif_carrier_off(pl->netdev);
> +
>  	/* Apply the link configuration to the MAC when starting. This allows
>  	 * a fixed-link to start with the correct parameters, and also
>  	 * ensures that we set the appropriate advertisement for Serdes links.
> -- 
> 2.17.1
> 

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 13.8Mbps down 630kbps up
According to speedtest.net: 13Mbps down 490kbps up

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ