]> git.baikalelectronics.ru Git - kernel.git/commit
init: carefully handle loglevel option on kernel cmdline.
authorAlexander Sverdlin <alexander.sverdlin@sysgo.com>
Wed, 21 Sep 2011 07:51:40 +0000 (09:51 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 21 Sep 2011 20:18:52 +0000 (13:18 -0700)
commit4d9bfd3ee4b0de450b3bb3a438e4085789a885f3
treeeabb672d84cf00b13225b44fdf2482b6900b5a14
parentd5098311967ff2f1a2b6b7327bc78ebb3b39c203
init: carefully handle loglevel option on kernel cmdline.

When a malformed loglevel value (for example "${abc}") is passed on the
kernel cmdline, the loglevel itself is being set to 0.

That then suppresses all following messages, including all the errors
and crashes caused by other malformed cmdline options.  This could make
debugging process quite tricky.

This patch leaves the previous value of loglevel if the new value is
incorrect and reports an error code in this case.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@sysgo.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/main.c