[PATCH] makedumpfile: ARM: fix bug on sparse_decode_mem_map
Liu Hua
sdu.liu at huawei.com
Tue May 6 20:34:08 PDT 2014
In sparse_decode_mem_map, makedumpfile checks whether coded_mem_map
is a valid vaddr. But coded_mem_map is not real vaddr. So this patch
checks decoded_mem_map instead.
Signed-off-by: Liu Hua <sdu.liu at huawei.com>
---
makedumpfile.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/makedumpfile.c b/makedumpfile.c
index 16081a5..1f06543 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -2794,12 +2794,14 @@ section_mem_map_addr(unsigned long addr)
unsigned long
sparse_decode_mem_map(unsigned long coded_mem_map, unsigned long section_nr)
{
- if (!is_kvaddr(coded_mem_map))
- return NOT_KV_ADDR;
+ unsigned long mem_map;
- return coded_mem_map +
+ mem_map = coded_mem_map +
(SECTION_NR_TO_PFN(section_nr) * SIZE(page));
}
+ if (!is_kvaddr(mem_map))
+ return NOT_KV_ADDR;
+ rerurn mem_map;
int
get_mm_sparsemem(void)
--
1.9.0
More information about the kexec
mailing list