Re: refcounting drivers' data structures used in sysfs buffers

From: Oliver Neukum
Date: Fri Mar 09 2007 - 15:40:06 EST


Am Freitag, 9. März 2007 21:27 schrieb Alan Stern:
> On Fri, 9 Mar 2007, Oliver Neukum wrote:
>
> > > Adding a new release() callback would solve the problem by creating
> > > another. Drivers need to release their data as soon as possible after
> > > they unbind from a device, not when the device itself goes away. Think
> >
> > Wait, the callback from closing the file in sysfs is the earliest we can safely
> > free the data structure. How do you want to free earlier?
>
> It is _not_ the earliest we can safely free the data structure.
>
> Dmitry's callback occurs when _all_ the sysfs attributes have been
> released -- including ones that don't have anything to do with the
> driver's private data structure. Think of the bInterfaceClass attribute,
> for example.

Ok, yes I see. It is by far too late.

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