Re: [USB] Fix connect/disconnect race

From: Pete Zaitcev
Date: Sun Nov 30 2003 - 21:04:57 EST


> 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.

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/