On Thu, 3 May 2007, Tejun Heo wrote:

> Hello, Alan Stern.
> 
> Alan Stern wrote:
> >> 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).
> 
> What has been filled with the 6b pattern here is struct attribute not
> some sysfs internal object.

Are you sure?

>  Does USB allocate struct attribute
> dynamically for any of its attributes?

No; it uses sysfs_create_group() with a static attribute group list.  I
don't know why it doesn't call device_add_group() -- maybe it was written
before that function existed.

You can see the code in drivers/usb/core/endpoint.c:usb_create_ep_files().

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