On Sun, 2007-09-09 at 09:16 +0100, Paul Durrant wrote:
> On 09/09/2007, Peter Memishian <[EMAIL PROTECTED]> wrote:
> >
> > I presume you mean mac_unregister() above?  When I was originally talking
> > through this problem with Seb (which led to mac_condemn()), my contention
> > was that the very notion that a destructive operation can fail represents
> > a design flaw (indeed, we have many of these in Unix -- close(2) being the
> > most notable).  The introduction of mac_condemn() should make it possible
> > to ensure that mac_unregister() *will* not fail (short of passing it bogus
> > arguments or other minutia), thus eliminating any need to worry about
> > undoing partial teardowns.
> >
> 
> The general idea behind mac_unregister() and the fact that it can fail
> is that it should be the first thing called by a driver's detach(9e)
> entry point. If it fails the detach() bombs out and nothing further is
> done. (This is similar to the check that DLPI drivers need to do for
> open streams, although qattach may have done away with the need for
> that check).

But this very act of "being the first thing it calls" means that the
driver isn't necessarily single threaded yet!

mac_condemn as a solution solves the problem.  I'd have chosen different
names, but I'm willing to overlook that if we can get it pushed into
Nemo (and the offending drivers fixed.)

        -- Garrett
> 
>   Paul
> 

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to