Re: [RFC] embedded struct device Re: [patch] IDE driver model update

Greg KH
2002-10-08T21:28:12Z

On Tue, Oct 08, 2002 at 04:47:49PM -0400, Alexander Viro wrote:
> >
> > The only timing issue is when the device structures are reused. And, it
> > seems that that is inherently racy anyway with hotpluggable devices.
>
> BS. Neither SCSI, nor USB nor PCI are reusing the structures in question.
> They are, however, freeing them.
>
> Again, USB disconnect when you are holding a reference to struct device
> will leave you with pointer to kfree'd area.

This is a USB (and PCI) bug. I'll fix them, they should be using the
release() callback that Pat has provided. With that callback, which
gets called when the device really wants to be cleaned up, I don't see
any races in the USB code (well theoretical races, there's still some
bugs in the current implementation that I'm trying to track down...)

thanks,

greg k-h