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]
Date: Mon, 3 Jun 2024 06:39:02 +0000
From: Hayes Wang <hayeswang@...ltek.com>
To: Douglas Anderson <dianders@...omium.org>,
        "David S . Miller"
	<davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
CC: "danielgeorgem@...gle.com" <danielgeorgem@...gle.com>,
        Andrew Lunn
	<andrew@...n.ch>, Grant Grundler <grundler@...omium.org>,
        Heiner Kallweit
	<hkallweit1@...il.com>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        "linux-usb@...r.kernel.org"
	<linux-usb@...r.kernel.org>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
Subject: RE: [PATCH REPOST net-next 1/2] r8152: If inaccessible at resume time, issue a reset

Douglas Anderson <dianders@...omium.org>
> Sent: Friday, May 31, 2024 7:43 AM
[...]
> If we happened to get a USB transfer error during the transition to
> suspend then the usb_queue_reset_device() that r8152_control_msg()
> calls will get dropped on the floor. This is because
> usb_lock_device_for_reset() (which usb_queue_reset_device() uses)
> silently fails if it's called when a device is suspended or if too
> much time passes.
> 
> Let's resolve this by resetting the device ourselves in r8152's
> resume() function.
> 
> NOTE: due to timing, it's _possible_ that we could end up with two USB
> resets: the one queued previously and the one called from the resume()
> patch. This didn't happen in test cases I ran, though it's conceivably
> possible. We can't easily know if this happened since
> usb_queue_reset_device() can just silently drop the reset request. In
> any case, it's not expected that this is a problem since the two
> resets can't run at the same time (because of the device lock) and it
> should be OK to reset the device twice. If somehow the double-reset
> causes problems we could prevent resets from being queued up while
> suspend is running.
> 
> Signed-off-by: Douglas Anderson <dianders@...omium.org>

Acked-by: Hayes Wang <hayeswang@...ltek.com>

Best Regards,
Hayes


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ