Fix connect/disconnect race
Quoted 8 lines
This patch was integrated by you in 2.4 six months ago. Unfortunately it never got into 2.5. Without it you can end up with crashes such as http://bugs.debian.org/218670
drivers/usb/core/hub.c +0
-0break ; }
drivers/usb/core/hub.c
Quoted 10 lines
drivers/usb/core/hub.c +3
-2- hub->children[port] = dev; dev->state =USB_STATE_POWERED ;/* Run it through the hoops (find a driver, etc) */ -if (!usb_new_device (dev, &hub->dev)) +if (!usb_new_device (dev, &hub->dev)) { + hub->children[port] = dev; goto done; + }
I'm surprised you need it. The updated usbfs is supposed to be immune. This is probably the reason it wasn't ported.
-- Pete
Quoted 9 lines · Pete Zaitcev
Quoted 9 lines
This patch was integrated by you in 2.4 six months ago. Unfortunately it never got into 2.5. Without it you can end up with crashes such as http://bugs.debian.org/218670
drivers/usb/core/hub.c +0
-0break ; }
Quoted 12 lines
drivers/usb/core/hub.c
Quoted 9 lines
drivers/usb/core/hub.c +3
-2- hub->children[port] = dev; dev->state =USB_STATE_POWERED ;/* Run it through the hoops (find a driver, etc) */ -if (!usb_new_device (dev, &hub->dev)) +if (!usb_new_device (dev, &hub->dev)) { + hub->children[port] = dev; goto done; + }I'm surprised you need it. The updated usbfs is supposed to be immune. This is probably the reason it wasn't ported.
Well the race occurs between usb_disconnect() initiated by rmmod uhci-hcd and this function.
Signature · 4 lines
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt