Re: [RFC] Raceless module interface

From: David Gibson (david@gibson.dropbear.id.au)
Date: Thu Sep 12 2002 - 22:14:29 EST


On Fri, Sep 13, 2002 at 11:30:47AM +1000, Paul 'Rusty' Russell wrote:
> In message <Pine.LNX.4.44.0209121520300.28515-100000@serv> you write:
> > Hi,
> >
> > On Thu, 12 Sep 2002, Rusty Russell wrote:
> >
> > > Nope, that's one of the two problems. Read my previous post: the
> > > other is partial initialization.
> > >
> > > Your patch is two-stage delete, with the additional of a usecount
> > > function. So you have to move the usecount from the module to each
> > > object it registers: great for filesystems, but I don't think it buys
> > > you anything (since they were easy anyway).
> >
> > I'm aware of the init problem, what I described was the core problem,
> > which prevents any further cleanup.
>
> I don't think of either of them as core, they are two problems.

Actually, with one stage init, module unload is essentially a special
case of module load failure, consider:
        module_init()
        {
                /* initialize stuff */
                ...

                wait_event_interruptible(wq, 0 == 1);

                /* clean stuff up */
                ...
                return -EINTR
        }

-- 
David Gibson			| For every complex problem there is a
david@gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Sep 15 2002 - 22:00:31 EST