On Fri, 2007-09-07 at 16:49 +0100, Paul Durrant wrote:
> On 07/09/2007, Garrett D'Amore <[EMAIL PROTECTED]> wrote:
> > > You mean upstream callers that have done mac_open()? That should take
> > > a ref. on the mac_impl_t.
> >
> > Yes, but since that reference count would not be covered by a lock that
> > the driver currently knows about or could safely acquire, the driver
> > clould not rely upon it to tell it anything meaningful.
> >
>
> ? Surely mac_unregister() *must* take the same lock as mac_open() to
> check the ref. count? It should do, if it doesn't today.
Yes, but you're *missing* the point.
The point is that without calling mac_unregister(), the driver doesn't
know if there are any active upstream callers.
So the only easy solution I can come up with without major contortions
on the part of drivers, is to create a new function, that separates
*unregistration* (which honors such a reference count) from actually
freeing the memory associated with the mac_impl_t.
-- Garrett
>
> Paul
>
_______________________________________________
networking-discuss mailing list
[email protected]