From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from szxga02-in.huawei.com ([119.145.14.65]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WhuAG-0007dx-PP for kexec@lists.infradead.org; Wed, 07 May 2014 05:13:10 +0000 Message-ID: <5369C0A9.5060805@huawei.com> Date: Wed, 7 May 2014 13:12:09 +0800 From: Liu hua MIME-Version: 1.0 Subject: Re: [PATCH] makedumpfile: ARM: fix bug on sparse_decode_mem_map References: <1399433648-61724-1-git-send-email-sdu.liu@huawei.com> In-Reply-To: <1399433648-61724-1-git-send-email-sdu.liu@huawei.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Liu Hua , kumagai-atsushi@mxc.nes.nec.co.jp, chaowang@redhat.com Cc: wangnan0@huawei.com, kexec@lists.infradead.org, peifeiyue@huawei.com On 2014/5/7 11:34, Liu Hua wrote: > 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 > --- > 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) > Very sorry for this patch! I send the wrong one. So ignore it. I will resend the correct verison. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec