[PATCH] 2.6: races between modprobe and depmod in rc.sysinit

From: Andrey Borzenkov (arvidjaar@mail.ru)
Date: Fri Aug 01 2003 - 16:22:55 EST


On Friday 01 August 2003 10:34, Rusty Russell wrote:
> In message <200307312145.01711.arvidjaar@mail.ru> you write:
> > the only reason I can imagine is that it hits depmod -A that runs in
> > rc.sysinit and does
> >
> > truncate /lib/modules/`uname -r`/modules.*
> > scan modules
> > write files
> >
> > So, quesitons
> >
> > - would anybody (Rusty?) object if I change depmod to do
> > build temp name
> > move temp name into original
>
> No, that's definitely my preferred method anyway: please send patch.
> Although I double this causes your problem here.
>

this does :) I have seen even more incredible races during boot recently. It
affects other modules as well, like input loaded by hotplug triggered by USB
load. depmod on current 2.6 takes some not negligible time.

anyway here is patch against 0.9.13-pre that makes depmod output in temp file
and rename it after. It fixed the problem for sure for me (like commenting
out depmod in rc.sysinit did but most people seem to object to it).

> > - Chmouel, Fred - is depmod on every boot really neccessary? When people
> > install modules they are expected to run it actually ...
>
> People get it wrong, and you still want them to boot. Increasingly we
> can live without depmod though: I might fix this in a near-future
> version to live without it.
>

would be nice.

-andrey


-
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 : Thu Aug 07 2003 - 22:00:17 EST