lkml.org 
[lkml]   [2003]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [USB] Fix connect/disconnect race
From
On Sun, Nov 30, 2003 at 09:03:34PM -0500, Pete Zaitcev wrote:
> > 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
>
> > --- kernel-source-2.5/drivers/usb/core/hub.c 28 Sep 2003 04:44:16 -0000 1.1.1.15
> > +++ kernel-source-2.5/drivers/usb/core/hub.c 30 Nov 2003 07:44:40 -0000
> > break;
> > }
> >
> > - 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.
--
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.046 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site