Re: kerneld/request-route interaction bug with kernel patch

Eric W. Biederman (ebiederm@cse.unl.edu)
02 Jul 1996 10:45:20 -0500


inr-linux-kernel@ms2.inr.ac.ru (really kuznet@ms2.inr.ac.ru) writes:

>
> Eric W. Biederman (ebiederm@cse.unl.EDU) wrote:
> : "A.N.Kuznetsov" <kuznet@ms2.inr.ac.ru> writes:
> : [snip]
> : > The second problem is that kerneld_send is intrinsically not
> : > reenterant, so that it is not allowed to be called from interrupt.
> : > The probability of crash is pretty small, but not zero...
>
> : This might explain the other day when I was running dosemu typed a:
> : and got the standard device not ready abort/retry/fail message.
> : Being impatient I typed rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.
> : When I examined the loaded modules there were 2 coppies of floppy.o
> : loaded.
> : after I rmmoded floppy.o twice and waited a while I could load my
> : floppy driver and things worked o.k. again.
>
> : At the very least there is a race where kerneld doesn't check what it
> : has loaded before it tries to load something.
>
> It is the greatest bug (set of bugs) of current modules, that has nothing
> to do with interrupts and even with kerneld. It exists since
> the first version of modules and can be easily triggered by plain
> insmod.

I tried I can't. insmod keeps me telling floppy.o was already loaded.
The only reason it seems to have happened in the floppy case is that
one of the modules was inserted while the other was still
intializing. They were both stuck in their init sections! This
sounds like a race condition in the loading of the module to me.

> I promised to eat my hat for breakfast, if Bjorn will manage to repair it
> without complete rewrote of modules :-) Seems, I won, but I am not glad
> to this win. It is very bad, that this broken code lives in "stable" 2.0,
> it does not credit to Linux.

Overal the modules work very well. For anything I had to depend and
didn't have something like a mount procedure I'd not use a module as
the latency is too long for a fast response. For fifteen jillion file
systems and a bunch of other kernel frills it's great.

> I am tired to scream about it, and believe that the honest solution
> would be to move all module staff to EXPERIMENTAL status for 2.0.

No just buggy like the rest of 2.0 and just as stable too :)

> Bjorn, do not shoot, please :-)
>
> Alexey Kuznetsov.
>