On Tue, 22 Jul 2003, Johannes Erdfelt wrote:

> It probably is a good idea to fix it. I want to take a look at the
> problem a little closer, but I agree there is a problem.
> 
> I only have one question about the implementation.
> 
> > +   /* Convert wIndex to origin 0; if it was 0, it will wrap around */
> > +   --wIndex;
> 
> We should probably do sanity checking on wIndex in more places. A
> malformed control message can probably cause an oops.

You're right.  The GetPortStatus case needs sanity checking on wIndex.  
However all the other occurrences do have the necessary checks.

Another thing that could stand fixing is the calls to mdelay() in the 
USB_PORT_FEAT_RESET handler.  Since uhci_hub_control() is invoked 
indirectly by usb_submit_urb(), it might get called with interrupts 
disabled (although the existing hub driver doesn't ever do that).  Maybe 
someone should document that since root-hub control URBs are processed 
synchronously, they should never be submitted with interrupts disabled -- 
such as from within a completion routine.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to