Re: usb storage cleanup

Greg KH (greg@kroah.com)
Thu, 4 Jul 2002 13:02:37 -0700


On Thu, Jul 04, 2002 at 04:54:32PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jul 04, 2002 at 12:50:12PM -0700, Matthew Dharm escreveu:
> > > > Because relying on a pointer has caused problems in the past, especially
> > > > when there are concerns that the pointer might be invalid.
>
> > > Could you explain a bit more? How could the pointer become invalid?
>
> > There was a large discussion of this in relation to another driver on
> > linux-usb-devel... basically, the pointer is just an address to a structure
> > owned by an HCD... it's entirely possible for the structure to go away on
> > us unexpectedly. We _should_ get the notification via the _disconnect()
> > call, but real-world experience showed us that this wasn't always
> > happening.
>
> Humm, I believed that USB was using refcounting

Parts of it is, parts aren't :(

Soon, due to the struct device and struct driver conversion everything
should be properly reference counted. But I'm not really aware of the
problem that Matt is referring to. Matt, what structure is
disappearing?

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/