summaryrefslogtreecommitdiffstats
path: root/scripts/gen_initramfs_list.sh
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2014-11-11 16:29:46 +1030
committerRusty Russell <rusty@rustcorp.com.au>2014-11-11 17:03:19 +1030
commit3438cf549d2f3ee8e52c82acc8e2a9710ac21a5b (patch)
tree36475a18712046cbc4104f24fd5ae2864d289405 /scripts/gen_initramfs_list.sh
parent206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff)
param: fix crash on bad kernel arguments
Currently if the user passes an invalid value on the kernel command line then the kernel will crash during argument parsing. On most systems this is very hard to debug because the console hasn't been initialized yet. This is a regression due to commit 51e158c12aca ("param: hand arguments after -- straight to init") which, in response to the systemd debug controversy, made it possible to explicitly pass arguments to init. To achieve this parse_args() was extended from simply returning an error code to returning a pointer. Regretably the new init args logic does not perform a proper validity check on the pointer resulting in a crash. This patch fixes the validity check. Should the check fail then no arguments will be passed to init. This is reasonable and matches how the kernel treats its own arguments (i.e. no error recovery). Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Cc: stable@vger.kernel.org Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'scripts/gen_initramfs_list.sh')
0 files changed, 0 insertions, 0 deletions