On Sun, 15 Dec 2002 01:50:35 +0100 "Oliver Neukum" <[EMAIL PROTECTED]> wrote:
> Am Samstag, 14. Dezember 2002 22:23 schrieb Kari Hameenaho: > > On Sat, 14 Dec 2002 16:44:30 +0100 > > > > "Oliver Neukum" <[EMAIL PROTECTED]> wrote: > > > Yes. Either you have a private array, which will lead people to do > > > proper locking, or you have a function and reference counting. > > > But a function which returns a pointer to a memory area that > > > could go away is a recipe for desaster. > > > > I thought that the usb_interface never goes away ? > > They perish with their device. > If that weren't the case we'd have a memory leak. Ok, then there is no reson to put minor there. I thought that there were fixed number of interfaces and they just are assigned to devices. > > > If you do that, the list accessing functions can have internal locking. > > > And you've caused a temptation. You have now a way to get at a driver's > > > interfaces without the driver's knowledge. > > > > You can do it now too, nothing is changed here ? > > Not with knowledge of only the minor number. > Oh, you mean access to usb_interface, that can easily be fixed and find function can return the local data pointer. The pointer must be void then, I dont know if it is good idea. But local data pointer can even now be by searching a list, "minor table" is a list too. --- Kari H�meenaho ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
