On Wed, 24 Sep 2003, David Brownell wrote: > > >> */ > >> dev->state = USB_STATE_NOTATTACHED; > >>+ down(&dev->serialize); > >> > >> dev_info (&dev->dev, "USB disconnect, address %d\n", dev->devnum); > >> > > > > > > It seems to me that dev->state should be protected by the semaphore here. > > Why? The actual device state is already "not attached". > > The user didn't even have access to that semaphore; there's > no way the kernel can "protect" against it. > > If we'd acted on that earlier (when the device was first > unplugged), likely we could have presented some URBs from > being submitted -- speeding up our cleanup work here.
I'm with Oliver on this one. What if a usb_reset_configuration() call was going on at the same time? The code here would set the state to NOTATTACHED and then reset_config would set it to ADDRESS. Not what we want. Alan Stern ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
