* [PATCH RESEND] condition check fix
@ 2014-05-08 11:26 WANG Chao
2014-05-08 14:14 ` Vivek Goyal
0 siblings, 1 reply; 5+ messages in thread
From: WANG Chao @ 2014-05-08 11:26 UTC (permalink / raw)
To: vgoyal, horms; +Cc: kexec
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@redhat.com>
---
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
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH RESEND] condition check fix 2014-05-08 11:26 [PATCH RESEND] condition check fix WANG Chao @ 2014-05-08 14:14 ` Vivek Goyal 2014-05-08 14:37 ` WANG Chao 2014-05-10 23:43 ` Simon Horman 0 siblings, 2 replies; 5+ messages in thread From: Vivek Goyal @ 2014-05-08 14:14 UTC (permalink / raw) To: WANG Chao; +Cc: horms, kexec 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@redhat.com> Ok, this fixes the issue for me. Thanks. Acked-by: Vivek Goyal <vgoyal@redhat.com> 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. 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 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND] condition check fix 2014-05-08 14:14 ` Vivek Goyal @ 2014-05-08 14:37 ` WANG Chao 2014-05-10 23:43 ` Simon Horman 1 sibling, 0 replies; 5+ messages in thread From: WANG Chao @ 2014-05-08 14:37 UTC (permalink / raw) To: Vivek Goyal; +Cc: horms, kexec On 05/08/14 at 10:14am, 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@redhat.com> > > Ok, this fixes the issue for me. Thanks. > > Acked-by: Vivek Goyal <vgoyal@redhat.com> > > 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. Right, another stupid carelessness. Already sent a fix. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND] condition check fix 2014-05-08 14:14 ` Vivek Goyal 2014-05-08 14:37 ` WANG Chao @ 2014-05-10 23:43 ` Simon Horman 2014-05-10 23:59 ` Simon Horman 1 sibling, 1 reply; 5+ messages in thread From: Simon Horman @ 2014-05-10 23:43 UTC (permalink / raw) To: Vivek Goyal; +Cc: kexec, WANG Chao 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@redhat.com> > > Ok, this fixes the issue for me. Thanks. > > Acked-by: Vivek Goyal <vgoyal@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 > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND] condition check fix 2014-05-10 23:43 ` Simon Horman @ 2014-05-10 23:59 ` Simon Horman 0 siblings, 0 replies; 5+ messages in thread From: Simon Horman @ 2014-05-10 23:59 UTC (permalink / raw) To: Vivek Goyal; +Cc: kexec, WANG Chao On Sun, May 11, 2014 at 08:43:54AM +0900, Simon Horman wrote: > 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@redhat.com> > > > > Ok, this fixes the issue for me. Thanks. > > > > Acked-by: Vivek Goyal <vgoyal@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? I see you have already done so, thanks. > > > 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 > > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-11 8:37 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-05-08 11:26 [PATCH RESEND] condition check fix WANG Chao 2014-05-08 14:14 ` Vivek Goyal 2014-05-08 14:37 ` WANG Chao 2014-05-10 23:43 ` Simon Horman 2014-05-10 23:59 ` Simon Horman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox