From a0c27338252d24dc052ca456235b99a7fb7fee45 Mon Sep 17 00:00:00 2001 From: Petr Tesarik Date: Thu, 5 Apr 2018 13:39:26 +0200 Subject: Fix a segmentation fault when trying to run "kexec -p" Do not fall through to "--mem-min" when "-p" option is parsed. The break statement was apparently removed by mistake... Fixes: cb434cbe6f40 ("kexec: Do not special-case the -s option") Signed-off-by: Petr Tesarik Tested-by: Bhupesh Sharma Signed-off-by: Simon Horman --- kexec/kexec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kexec/kexec.c b/kexec/kexec.c index 612c1c2..313d9fe 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -1349,6 +1349,7 @@ int main(int argc, char *argv[]) do_sync = 0; kexec_file_flags |= KEXEC_FILE_ON_CRASH; kexec_flags = KEXEC_ON_CRASH; + break; case OPT_MEM_MIN: mem_min = strtoul(optarg, &endptr, 0); if (*endptr) { -- cgit