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: <a28f38d5-215b-49fb-aad7-66e0a30247b9@lunn.ch>
Date: Wed, 6 Aug 2025 17:58:18 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Xu Yang <xu.yang_2@....com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, max.schulze@...ine.de,
	khalasa@...p.pl, o.rempel@...gutronix.de, linux-usb@...r.kernel.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	imx@...ts.linux.dev, jun.li@....com
Subject: Re: [PATCH] net: usb: asix: avoid to call phylink_stop() a second
 time

On Wed, Aug 06, 2025 at 04:30:17PM +0800, Xu Yang wrote:
> The kernel will have below dump when system resume if the USB net device
> was already disconnected during system suspend.

By disconnected, you mean pulled out?

> It's because usb_resume_interface() will be skipped if the USB core found
> the USB device was already disconnected. In this case, asix_resume() will
> not be called anymore. So asix_suspend/resume() can't be balanced. When
> ax88772_stop() is called, the phy device was already stopped. To avoid
> calling phylink_stop() a second time, check whether usb net device is
> already in suspend state.
> 
> Fixes: e0bffe3e6894 ("net: asix: ax88772: migrate to phylink")
> Cc: stable@...r.kernel.org
> Signed-off-by: Xu Yang <xu.yang_2@....com>
> ---
>  drivers/net/usb/asix_devices.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
> index 9b0318fb50b5..ac28f5fe7ac2 100644
> --- a/drivers/net/usb/asix_devices.c
> +++ b/drivers/net/usb/asix_devices.c
> @@ -932,7 +932,8 @@ static int ax88772_stop(struct usbnet *dev)
>  {
>  	struct asix_common_private *priv = dev->driver_priv;
>  
> -	phylink_stop(priv->phylink);
> +	if (!dev->suspend_count)
> +		phylink_stop(priv->phylink);

Looking at ax88172a.c, lan78xx.c and smsc95xx.c, they don't have
anything like this. Is asix special, or are all the others broken as
well?

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ