kernel-ark/init
P J P df3ef3af50 init/do_mounts_rd.c: fix NULL pointer dereference while loading initramfs
Make menuconfig allows one to choose compression format of an initial
ramdisk image.  But this choice does not result in duly compressed initial
ramdisk image.  Because - $ make install - does not pass on the selected
compression choice to the dracut(8) tool, which creates the initramfs
file.  dracut(8) generates the image with the default compression, ie.
gzip(1).

If a user chose any other compression instead of gzip(1), it leads to a
crash due to NULL pointer dereference in crd_load(), caused by a NULL
function pointer returned by the 'decompress_method()' routine.  Because
the initramfs image is gzip(1) compressed, whereas the kernel knows only
to decompress the chosen format and not gzip(1).

This patch replaces the crash by an explicit panic() call with an
appropriate error message. This shall prevent the kernel from
eventually panicking in: init/do_mounts.c: mount_block_root() with
  -> panic("VFS: Unable to mount root fs on %s", b);

[akpm@linux-foundation.org: mention that the problem is with the ramdisk, don't print known-to-be-NULL value]
Signed-off-by: P J P <prasad@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13 12:09:26 +09:00
..
calibrate.c kernel: delete __cpuinit usage from all core kernel files 2013-07-14 19:36:59 -04:00
do_mounts_initrd.c usermodehelper: split remaining calls to call_usermodehelper_fns() 2013-04-30 17:04:06 -07:00
do_mounts_md.c init: disable sparse checking of the mount.o source files 2012-05-31 17:49:27 -07:00
do_mounts_rd.c init/do_mounts_rd.c: fix NULL pointer dereference while loading initramfs 2013-11-13 12:09:26 +09:00
do_mounts.c init/do_mounts.c: add maj:min syntax comment 2013-11-13 12:09:12 +09:00
do_mounts.h md: move lots of #include lines out of .h files and into .c 2009-03-31 14:33:13 +11:00
init_task.c sched/rt: Move rt specific bits into new header file 2013-02-07 20:51:08 +01:00
initramfs.c init, block: try to load default elevator module early during boot 2013-01-18 14:05:56 -08:00
Kconfig Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-11-12 10:36:00 +09:00
main.c init/main.c: remove prototype for softirq_init() 2013-11-13 12:09:13 +09:00
Makefile init_task: Replace CONFIG_HAVE_GENERIC_INIT_TASK 2012-05-05 13:00:46 +02:00
noinitramfs.c init: mark __user address space on string literals 2010-10-26 16:52:15 -07:00
version.c proc: Split the namespace stuff out into linux/proc_ns.h 2013-05-01 17:29:39 -04:00