From: Heiko Carstens Date: Fri, 8 Dec 2006 14:56:13 +0000 (+0100) Subject: [S390] Poison init section before freeing it. X-Git-Tag: v2.6.20-rc1~34^2~31^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=028d9b3cc62cb9dd31f1b5929edb3c23612cfccc;p=linux-2.6-omap-h63xx.git [S390] Poison init section before freeing it. The data patterns should allow us to easily tell if somebody accesses initdata/code after it was freed. Same code as on various other architectures. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index aa39591ca13..4bb21be3b00 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -187,6 +188,7 @@ void free_initmem(void) for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { ClearPageReserved(virt_to_page(addr)); init_page_count(virt_to_page(addr)); + memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); free_page(addr); totalram_pages++; }