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: Tue, 25 Jun 2024 12:52:21 -0400
From: Alan Stern <stern@...land.harvard.edu>
To: Lizhe <sensor1010@....com>
Cc: gregkh@...uxfoundation.org, hgajjar@...adit-jv.com,
  stanley_chang@...ltek.com, ricardo.canuelo@...labora.com,
  johan+linaro@...nel.org, linux-usb@...r.kernel.org,
  linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB: hub:no need to obtain usb device

On Tue, Jun 25, 2024 at 09:46:07AM -0700, Lizhe wrote:
> the usb device connected to the port has obtained.
> there is no need to obtain it again.
> 
> Signed-off-by: Lizhe <sensor1010@....com>
> ---
>  drivers/usb/core/hub.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 4b93c0bd1d4b..f37b991fa86a 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -5358,7 +5358,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
>  	if (udev) {
>  		if (hcd->usb_phy && !hdev->parent)
>  			usb_phy_notify_disconnect(hcd->usb_phy, udev->speed);
> -		usb_disconnect(&port_dev->child);
> +		usb_disconnect(&udev);
>  	}

This is wrong.  We need to pass the address of port_dev->child, not the 
address of udev.  This is so that usb_disconnect() can set 
port_dev->child to NULL.  Setting udev to NULL instead won't work right.

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ