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] [day] [month] [year] [list]
Message-ID: <1c352c2f-c8b3-4cbe-9921-8ba5f0e4b433@lunn.ch>
Date: Fri, 15 Aug 2025 14:59:12 +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

> > > 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?
> > 
> > I have limited USB net devices. So I can't test others now.
> > 
> > But based on the error path, only below driver call phy_stop() or phylink_stop()
> > in their stop() callback:
> > 
> > drivers/net/usb/asix_devices.c
> >   ax88772_stop()
> >     phylink_stop()
> > 
> > drivers/net/usb/ax88172a.c
> >   ax88172a_stop()
> >     phy_stop()
> > 
> > drivers/net/usb/lan78xx.c
> >   lan78xx_stop()
> >     phylink_stop()
> > 
> > drivers/net/usb/smsc95xx.c
> >   smsc95xx_stop()
> >     phy_stop()
> > 
> > However, only asix_devices.c and lan78xx.c call phylink_suspend() in suspend()
> > callback. So I think lan78xx.c has this issue too.
> > 
> > Should I change usbnet common code like below?
> > 
> > diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
> > index c39dfa17813a..44a8d325dfb1 100644
> > --- a/drivers/net/usb/usbnet.c
> > +++ b/drivers/net/usb/usbnet.c
> > @@ -839,7 +839,7 @@ int usbnet_stop (struct net_device *net)
> >         pm = usb_autopm_get_interface(dev->intf);
> >         /* allow minidriver to stop correctly (wireless devices to turn off
> >          * radio etc) */
> > -       if (info->stop) {
> > +       if (info->stop && !dev->suspend_count) {
> >                 retval = info->stop(dev);
> >                 if (retval < 0)
> >                         netif_info(dev, ifdown, dev->net,
> 
> Do you mind sharing some suggestions on this? Thanks in advance!

It does look to be a common problem, so solving it in usbnet would be
best.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ