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: <663e2978-8e89-4af4-bc1f-ebbcb2c57b1c@suse.com>
Date: Mon, 18 Aug 2025 11:04:55 +0200
From: Oliver Neukum <oneukum@...e.com>
To: Xu Yang <xu.yang_2@....com>, oneukum@...e.com, andrew+netdev@...n.ch,
 davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, linux-usb@...r.kernel.org
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] net: usbnet: skip info->stop() callback if suspend_count
 is not 0

On 8/18/25 09:57, Xu Yang wrote:

> --- 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);

This needs to fail ...

>   	/* allow minidriver to stop correctly (wireless devices to turn off
>   	 * radio etc) */
> -	if (info->stop) {
> +	if (info->stop && !dev->suspend_count) {

... for !dev->suspend_count to be false

>   		retval = info->stop(dev);
>   		if (retval < 0)
>   			netif_info(dev, ifdown, dev->net,

In other words, this means that the driver has insufficient
error handling in this method. This needs to be fixed and it
needs to be fixed explicitly. We do not hide error handling.

Please use a literal "if (pm < 0)" to skip the parts we need to skip
if the resumption fails.

	Regards
		Oliver

NACKED-BY: Oliver Neukum <oneukum@...e.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ