diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-12-08 15:56:13 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-12-08 15:56:13 +0100 |
commit | 028d9b3cc62cb9dd31f1b5929edb3c23612cfccc (patch) | |
tree | ab09aa1722b53ffb1c890a6c59ebf047d2997501 /arch/s390/mm/init.c | |
parent | 39b742f957a287a7514a8a35c9f516cdf30b9ff5 (diff) | |
download | kernel_samsung_crespo-028d9b3cc62cb9dd31f1b5929edb3c23612cfccc.zip kernel_samsung_crespo-028d9b3cc62cb9dd31f1b5929edb3c23612cfccc.tar.gz kernel_samsung_crespo-028d9b3cc62cb9dd31f1b5929edb3c23612cfccc.tar.bz2 |
[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 <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm/init.c')
-rw-r--r-- | arch/s390/mm/init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index aa39591..4bb21be 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -24,6 +24,7 @@ #include <linux/pagemap.h> #include <linux/bootmem.h> #include <linux/pfn.h> +#include <linux/poison.h> #include <asm/processor.h> #include <asm/system.h> @@ -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++; } |