[PATCH RESEND] condition check fix

Simon Horman horms at verge.net.au
Sat May 10 16:43:54 PDT 2014


On Thu, May 08, 2014 at 10:14:29AM -0400, Vivek Goyal wrote:
> On Thu, May 08, 2014 at 07:26:17PM +0800, WANG Chao wrote:
> > In commit 91f5b9c ("kdump: pass e820 reserved region to 2nd kernel via
> > e820 table or setup_data"), I made a wrong condition check.
> > 
> > We should only add cmdline for a memory range if --pass-memmap-cmdline
> > and the range type isn't RANGE_RESERVED.
> > 
> > Signed-off-by: WANG Chao <chaowang at redhat.com>
> 
> Ok, this fixes the issue for me. Thanks.
> 
> Acked-by: Vivek Goyal <vgoyal at redhat.com>

Thanks, and apologies for the delay.
I am currently returning from a weeks vacation.
I have applied this locally and will push it some
time after I get off the plane ride home.

> BTW, on a related note, I see that we are doing GART check two times.
> 
>                 } else if (memcmp(str, "GART\n", 5) == 0) {
>                 } else if (memcmp(str, "GART\n", 5) == 0) {
> 
> I am not sure if it is due to your patches or not.

I believe it is introduced in the same patch that is mentioned above.
Chao, could you post a fix?

> Thanks
> Vivek
> 
> > ---
> >  kexec/arch/i386/crashdump-x86.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
> > index cc33347..999a837 100644
> > --- a/kexec/arch/i386/crashdump-x86.c
> > +++ b/kexec/arch/i386/crashdump-x86.c
> > @@ -1000,7 +1000,7 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
> >  		type = mem_range[i].type;
> >  		size = end - start + 1;
> >  		add_memmap(memmap_p, &nr_memmap, start, size, type);
> > -		if (arch_options.pass_memmap_cmdline || type != RANGE_RESERVED)
> > +		if (arch_options.pass_memmap_cmdline && type != RANGE_RESERVED)
> >  			cmdline_add_memmap_acpi(mod_cmdline, start, end);
> >  	}
> >  
> > -- 
> > 1.9.0
> 



More information about the kexec mailing list