From 4721e2214b5fd6eca48caea76afb1bad3148930f Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Tue, 6 Sep 2005 12:05:26 +1000 Subject: [PATCH] ppc64: poison initmem Poison initmem after we free it so we catch use after free issues. Signed-off-by: Anton Blanchard Signed-off-by: Paul Mackerras --- arch/ppc64/mm/init.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/ppc64/mm/init.c') diff --git a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c index b3b1e9c1770a..a14ab87df491 100644 --- a/arch/ppc64/mm/init.c +++ b/arch/ppc64/mm/init.c @@ -392,6 +392,7 @@ void free_initmem(void) addr = (unsigned long)__init_begin; for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) { + memset((void *)addr, 0xcc, PAGE_SIZE); ClearPageReserved(virt_to_page(addr)); set_page_count(virt_to_page(addr), 1); free_page(addr); -- cgit v1.2.3