[PATCH] Fix a segmentation fault when trying to run "kexec -p"

Simon Horman horms at verge.net.au
Tue Apr 10 02:15:16 PDT 2018


On Mon, Apr 09, 2018 at 02:14:09PM +0530, Bhupesh Sharma wrote:
> On 04/05/2018 05:09 PM, Petr Tesarik wrote:
> > Do not fall through to "--mem-min" when "-p" option is parsed. The
> > break statement was apparently removed by mistake...
> > 
> > Fixes: cb434cbe6f401037e448276bb12056d1fdc3dbfc
> > Signed-off-by: Petr Tesarik <ptesarik at suse.com>
> > ---
> >   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) {
> > 
> 
> 'kexec -p' is currently broken (segfaults) upstream. I tested this fix on my
> arm64 board, so:
> 
> Tested-by: Bhupesh Sharma <bhsharma at redhat.com>

Thanks, applied with the fixes tag updated to:

Fixes: cb434cbe6f40 ("kexec: Do not special-case the -s option")



More information about the kexec mailing list