summaryrefslogtreecommitdiff
path: root/kexec/firmware_memmap.c
diff options
context:
space:
mode:
authorBernhard Walle <bwalle@suse.de>2009-01-16 19:11:34 +0100
committerSimon Horman <horms@verge.net.au>2009-01-19 12:13:34 +1100
commit95c74405638c786bc76fbca5e4e8427dfe26e907 (patch)
tree056468013b19fe0320ef784a51a4621030913a75 /kexec/firmware_memmap.c
parent8afb534bf7c538eb3f57595054056289cda97b88 (diff)
Fix memory corruption when using realloc_memory_ranges()
Because realloc_memory_ranges() makes the old memory invalid, and we return a pointer to memory_range in get_memory_ranges(), we need to copy the contents in get_memory_ranges(). Some code that calls realloc_memory_ranges() may be triggered by get_base_ranges() which is called after get_memory_ranges(). Yes, the memory needs to be deleted somewhere, but I don't know currently where it's the best, and since it's not in a loop and memory is deleted anyway after program termination I don't want to introduce unneccessary complexity. The problem is that get_base_ranges() gets called from architecture independent code and that allocation is PPC64-specific here. Signed-off-by: Bernhard Walle <bwalle@suse.de>diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c index b0d8acd..ad8a31c 100644 Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/firmware_memmap.c')
0 files changed, 0 insertions, 0 deletions