On Thu, Nov 15, 2001 at 07:51:42PM -0800, David Brownell wrote:
> 
> I almost submitted a patch like that this summer, but didn't
> because I ran across some followon problems.  I forget
> the details, but in principle it should be safe to guard against
> such problems like this.
> 
> Clearly it's a bug if any driver still has a handle on a device
> after it's been removed.  Enabling slab poisoning should
> turn up such driver bugs.

I'm running all my machines with slab poisoning enabled, and I only saw
this happen once.


On Thu, Nov 15, 2001 at 06:11:15PM -0800, Matthew Dharm wrote:
> Hrm....
> 
> I thought that when a device was removed, the data structure wasn't freed
> until after the disconnect() routine returned.  If that's the case, then it
> would seem to make sense that none of the sub-structures (ie. the bus
> structure) would be freed either until after the device structure was
> freed.
> 
> Or is this something else?

The symptom is that visor_close() is being called after disconnect().
But I do set serial->dev to NULL in the serial disconnect, so
visor_close() _shouldn't_ be calling usb_unlink_urb().  But I did catch
an oops yesterday with this exact sequence, and then couldn't reproduce
it with debugging enabled.

In looking at usb_unlink_urb() I noticed how that could oops, hence the
patch.

Yes, this isn't solving the real problem.  And yes, the reference
counting issues need to be reworked.  But this fix is correct :)

thanks,

greg k-h

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to