All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] makedumpfile: ARM: fix bug on sparse_decode_mem_map
@ 2014-05-07  3:34 Liu Hua
  2014-05-07  5:12 ` Liu hua
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Hua @ 2014-05-07  3:34 UTC (permalink / raw)
  To: kumagai-atsushi, chaowang; +Cc: wangnan0, kexec, peifeiyue, Liu Hua

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@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


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-07  5:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07  3:34 [PATCH] makedumpfile: ARM: fix bug on sparse_decode_mem_map Liu Hua
2014-05-07  5:12 ` Liu hua

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.