--- kexec-tools-1.101/kexec/arch/i386/crashdump-x86.c.orig 2007-07-17 08:33:59.000000000 -0400 +++ kexec-tools-1.101/kexec/arch/i386/crashdump-x86.c 2007-07-17 08:34:13.000000000 -0400 @@ -663,6 +663,7 @@ int load_crashdump_segments(struct kexec int nr_ranges, align = 1024; long int nr_cpus = 0; struct memory_range *mem_range, *memmap_p; + int i; if (get_crash_memory_ranges(&mem_range, &nr_ranges) < 0) return -1; @@ -720,8 +721,13 @@ int load_crashdump_segments(struct kexec * elf core header segment to 16K to avoid being placed in such gaps. * This is a makeshift solution until it is fixed in kernel. */ - elfcorehdr = add_buffer(info, tmp, sz, 16*1024, align, min_base, - max_addr, -1); + for (i=0;inr_segments; i++) { + if ((base < (info->segment[i].mem + info->segment[i].memsz)) && + ((base+memsz) > info->segment[i].mem)) { + /* + *we have an overlap, bump down buf_max + */ + buf_max = (unsigned long)info->segment[i].mem; + goto retry; + } + } add_segment(info, buf, bufsz, base, memsz); return base;