On Mon, 13 Mar 2006, Paul Fulghum wrote: > Pete Zaitcev wrote: > > On Mon, 13 Mar 2006 16:31:35 -0600, Paul Fulghum <[EMAIL PROTECTED]> wrote: > > > > > >>>>> sysfs_remove_link(&class_dev->kobj, "device"); > >>>>> sysfs_remove_link(&class_dev->dev->kobj, class_name); > > > > > > The second one is probably where it dies. We only hold the interface, > > but not the device. The class_dev here is &acm->control->dev, embedded > > inside the interface. However, the kobj... I am not sure where that > > points. > > class_dev is the tty class device created by tty_register_device, > class_dev->dev is control_interface->dev.
Psul, the best way to approach a problem like this is by massive debugging printks. Print a line on entrance to the USB driver's disconnect routine, print a line to indicate which choice was taken at all the major branches, print a line in each of the routines on the tty_unregister_device pathway, print out the values of the important pointers, print out the values of atomic_read(&kobj.kref.refcount) for the important kobjects, ... You get the idea. Basically, just print out anything that might possibly be of interest. In fact, do all this on the device creation pathways as well as on the device removal pathways. Then check to see that at corresponding points during creation and removal, the refcount values agree. Perhaps there's a missing get or an extra put somewhere; a detailed analysis like this is about the only way to find such things. I've isolated several bugs in the SCSI stack using this strategy, time-consuming though it is. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel