]> git.baikalelectronics.ru Git - kernel.git/commit
uml: install panic notifier earlier
authorJeff Dike <jdike@addtoit.com>
Tue, 5 Feb 2008 06:31:08 +0000 (22:31 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 5 Feb 2008 17:44:29 +0000 (09:44 -0800)
commit7808fb964fc8ddf803fc2907307ff4e973f4ab15
treecf63f0646f64eecc80e5e3cd8d9c16252a751d8e
parentd021b78f376b0d53cf77dc443c42f31f13659cdb
uml: install panic notifier earlier

It turns out that if there's a panic early enough, UML will just sit there in
the LED-blinking loop because the panic notifier hadn't been installed yet.

This patch installs it earlier.

It also fixes the problem which exposed the hang, namely that if you give UML
a zero-sized initrd, it will ask alloc_bootmem for zero bytes, and that will
cause the panic.

While I was in initrd.c, I gave it a style makeover.

Prompted by checkpatch, I moved a couple extern declarations of uml_exitcode
to kern_util.h.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/include/kern_util.h
arch/um/kernel/initrd.c
arch/um/kernel/um_arch.c
arch/um/os-Linux/main.c