makedumpfile: ARM: fix bug on sparse_decode_mem_map
Subsystems (2)
PATCH 1/1 makedumpfile: ARM: fix bug on sparse_decode_mem_map
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 <[email protected]>
--- makedumpfile.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
makedumpfile.c +5 -3
@@ -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 )
Signature · 7 lines
1.9.0 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 22 lines · Liu Hua
In
sparse_decode_mem_map, makedumpfile checks whethercoded_mem_mapis a valid vaddr. Butcoded_mem_mapis not real vaddr. So this patch checksdecoded_mem_mapinstead.Signed-off-by Liu Hua <[email protected]>--- makedumpfile.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)makedumpfile.c +1
-2@@ -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;
makedumpfile.c section_mem_map_addr(unsigned long addr) · line 2807
Quoted 10 lines
makedumpfile.c +4
-1-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 )
Very sorry for this patch! I send the wrong one. So ignore it. I will resend the correct verison.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec