Am Sonntag, 15. Dezember 2002 23:58 schrieb Kari Hameenaho:
> On Sun, 15 Dec 2002 21:19:21 +0100
>
> "Oliver Neukum" <[EMAIL PROTECTED]> wrote:
> > Am Sonntag, 15. Dezember 2002 10:43 schrieb Kari Hameenaho:
> > > 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.
> >
> > Could you please explain your reasoning?
>
> Well, if the live time of the interface is same as other device specific
> data and the live time is a problem as in our mail and the function to get
> minor data from the interface is not good, then what reason is left to put
> it there ?
But this is about getting the interface from the minor, isn't it?
This is a problem that for drivers which use a character device
must be solved.
The only issue that I see is that you made common code for doing so
but failed to put proper locking into it, which means reference counting
in this case.
Regards
Oliver
Regards
Oliver
-------------------------------------------------------
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