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-next>] [day] [month] [year] [list]
Message-Id: <20221201175302.2732938-1-l.stach@pengutronix.de>
Date:   Thu,  1 Dec 2022 18:53:02 +0100
From:   Lucas Stach <l.stach@...gutronix.de>
To:     Russell King <linux@...linux.org.uk>, Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>
Cc:     netdev@...r.kernel.org, kernel@...gutronix.de,
        patchwork-lst@...gutronix.de
Subject: [PATCH] net: phylink: don't try to stop halted PHY

When the PHY driver has encountered a non-recoverable error condition, e.g
due to a failure in MDIO communication it may have already halted the PHY
by calling phy_error(). If that is the case then phylink should not try to
stop the PHY again.

Signed-off-by: Lucas Stach <l.stach@...gutronix.de>
---
 drivers/net/phy/phylink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 6547b6cc6cbe..1e2be9197567 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -1935,7 +1935,7 @@ void phylink_stop(struct phylink *pl)
 
 	if (pl->sfp_bus)
 		sfp_upstream_stop(pl->sfp_bus);
-	if (pl->phydev)
+	if (pl->phydev && phy_is_started(pl->phydev))
 		phy_stop(pl->phydev);
 	del_timer_sync(&pl->link_poll);
 	if (pl->link_irq) {
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ