Re: Runaway loop with the current git.

From: Evgeniy Polyakov
Date: Sun Dec 07 2008 - 06:45:32 EST


On Sun, Dec 07, 2008 at 11:23:35AM +0000, Alan Cox (alan@xxxxxxxxxxxxxxxxxxx) wrote:
> > This modprobe process does try to log an error, accesses /dev/console,
> > which is not initialized in the kernel at that time, and the kernel
> > module loader tries the load a module to support dev_t 5:1, which
> > again runs modprobe, and ...
>
> So we have a buggy modprobe...

Which nevertheless should not break boot process...

> > Setting CONFIG_CRYPTO_MANAGER=y makes it disapper. The patch I sent
> > seems to fix it.
> >
> > The bug is handled here: http://bugzilla.kernel.org/show_bug.cgi?id=12153
>
> We cannot go re-ordering random chunks of kernel init with unpredictable
> effects including possibly making other stuff less reliable (because you
> set up the console device before the console driver is loaded on a PCI
> bus device). And we certainly can't do it this close to a release.

Alan, really, do you believe that relying on userspace to be always
correct is the way to go? Requrement for the userspace to always have
enough buffer available when doing some reading is essetually the same.
We want userspace to be non-recursive, but if this does not happen, we
should not hung. Detect recursion, do not allow more than 1-2-3
simultaneous modprobes, whatever, but do not say, that kernel behaves
that bad just because userspace is allowed to do that.

And what's the argument of being close to a release? Do you propose to
hide the head into the sand and point a finger to anyone else saying its
not a kernel's problem? If prerelease has a bug, it should be fixed, and
not hidden under the cover.

What about storing a small stack of recently requested device ids, and
if new request is about to ask one from that stack, return error? I can
cook up the patch tomorrow.

--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/