On Thursday 14 December 2006 9:34 am, Phil Endecott wrote:
> 
> I am really new to this, please forgive me if I am on the wrong track.

Nope, you were right -- this is a problem.  Rare, but a problem.
Fixed by a patch I'm about to send ...


> In drivers/usb/gadget/inode.c, gadgetfs_setup(), there is some code 
> like this:
> 
>       spin_lock (&dev->lock);
>          [snip]
>                  dev->state = STATE_CONNECTED;
>               if (gadget->speed == USB_SPEED_HIGH && dev->hs_config == 0) {
>                       ERROR (dev, "no high speed config??\n");
>                       return -EINVAL;
> 
> I would guess that there ought to be an unlock before that return, and 
> that the change to dev->state should come later.  Certainly if I make 
> this change then I no longer get an ooops after writing bad descriptors.
> 
> I'm looking at the official 2.6.19 tree; if I ought to be looking 
> somewhere else for the latest code, please point me in the right 
> direction.  Thanks.
> 
> 
> Phil.
> 
> 
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to