On Wed, 2 May 2007, Chris Rankin wrote:

> Hi,
> 
> I have been hitting this bug regularly in the 2.6.20.x kernels:
> 
> http://bugzilla.kernel.org/show_bug.cgi?id=8198

I just looked at that bug report.  It's a mess.

> What *seems* to be happening is that something (winecfg?) is causing the USB 
> layer to allocate a
> new endpoint directory in /sys, and then quickly deallocate it again.

That's entirely possible.

> However, sometimes the
> endpoint directory is deallocated while udevd is still browsing it, and this 
> causes an oops.

Could be.  If that's your problem then the cause lies somewhere in the
sysfs code, not anywhere in the USB stack.

> The endpoint directory shown in the oops report does not exist if I'm not 
> thrashing the box with
> winecfg. On Tejun Heo's suggestion, I put some debug code at the beginning of 
> sysfs_release() to
> print a stack-dump and the kobject's path if the attr->owner field contains 
> 0x6b6b6b6b or
> 0x5a5a5a5a poison:
> 
> XXX debug trap owner=6b6b6b6b, path=/class/usb_endpoint/usbdev1.3_ep84
> XXX debug stack-dump
>  [<c018462a>] sysfs_release+0x70/0xa5
>  [<c0151837>] __fput+0x96/0x13c
>  [<c014f358>] filp_close+0x51/0x58
>  [<c0150351>] sys_close+0x70/0xa7
>  [<c0102bde>] sysenter_past_esp+0x5f/0x85
>  [<c0270033>] unix_create1+0xa2/0xee
>  =======================

This clearly indicates that something has been deallocated too early (or 
equivalently, used too late).

> Does anyone have any idea what's happening, please? According to 
> /proc/bus/usb/devices, this
> particular endpoint should only exist if we are using the Alt > 0 version of 
> this USB device's
> interface:
> 
> I:  If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
> I:  If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
> I:  If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
> E:  Ad=84(I) Atr=01(Isoc) MxPS=  90 Ivl=1ms
> I:  If#= 2 Alt= 2 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
> E:  Ad=84(I) Atr=01(Isoc) MxPS=  46 Ivl=1ms
> I:  If#= 2 Alt= 3 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
> E:  Ad=84(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
> I:  If#= 2 Alt= 4 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
> E:  Ad=84(I) Atr=01(Isoc) MxPS=  16 Ivl=1ms

That's more or less irrelevant.  It could explain why the sysfs directory
was created and then quickly destroyed, but that kind of activity is
perfectly legal and shouldn't trigger any sort of crash.

Have you tried using all the sysfs cleanup patches Tejun has posted 
recently?  Given that your bug is caused by sysfs, it seems like a logical 
thing to try.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to