Re: [PATCH] Fix init ordering of /dev/console vs callers ofmodprobe

From: Andrew Morton
Date: Wed Aug 25 2010 - 19:45:12 EST


On Fri, 06 Aug 2010 16:34:43 +0100
David Howells <dhowells@xxxxxxxxxx> wrote:

> Make /dev/console get initialised before any initialisation routine that
> invokes modprobe because if modprobe fails, it's going to want to open
> /dev/console, presumably to write an error message to.
>
> The problem with that is that if the /dev/console driver is not yet
> initialised, the chardev handler will call request_module() to invoke modprobe,
> which will fail, because we never compile /dev/console as a module.
>
> This will lead to a modprobe loop, showing the following in the kernel log:
>
> request_module: runaway loop modprobe char-major-5-1
> request_module: runaway loop modprobe char-major-5-1
> request_module: runaway loop modprobe char-major-5-1
> request_module: runaway loop modprobe char-major-5-1
> request_module: runaway loop modprobe char-major-5-1

Boy, that's a familiar message.

> This can happen, for example, when the built in md5 module can't find the built
> in cryptomgr module (because the latter fails to initialise). The md5 module
> comes before the call to tty_init(), presumably because 'crypto' comes before
> 'drivers' alphabetically.
>
> Fix this by calling tty_init() from chrdev_init().

http://www.google.com/search?sclient=psy&hl=en&site=&source=hp&q=%22request_module%3A+runaway+loop+modprobe%22&aq=f&aqi=g1&aql=&oq=&gs_rfai=CPc2Or6p1TOLmIIyu6QOT_-zuDwAAAKoEBU_QHJC0&pbx=1&cad=cbv
gets 10000 hits. How many of those do you reckon this patch will fix?

--
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/