Skip to contentSkip to conversation

kexec,x86: Use macro CRASH_MAX_MEMMAP_NR for clarification

PATCH Applied Zhang Yanfei 2 participants 2 messages Feb 26, 2013 – Mar 5, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

For the allocation, using CRASH_MAX_MEMMAP_NR instead of KEXEC_MAX_SEGMENTS + 1 seems more understandable.

---
 kexec/arch/i386/crashdump-x86.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kexec/arch/i386/crashdump-x86.c +1 -1
index 245402c..e4b8be3 100644
@@ -975,7 +975,7 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
                return -1; 
 
        /* Memory regions which panic kernel can safely use to boot into */
-       sz = (sizeof(struct memory_range) * (KEXEC_MAX_SEGMENTS + 1));
+       sz = (sizeof(struct memory_range) * CRASH_MAX_MEMMAP_NR);
        memmap_p = xmalloc(sz);
        memset(memmap_p, 0, sz);
        add_memmap(memmap_p, info->backup_src_start, info->backup_src_size);
Signature · 7 lines
1.7.1


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec