summaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-12-08 15:56:13 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-12-08 15:56:13 +0100
commit028d9b3cc62cb9dd31f1b5929edb3c23612cfccc (patch)
treeab09aa1722b53ffb1c890a6c59ebf047d2997501 /arch/s390/mm
parent39b742f957a287a7514a8a35c9f516cdf30b9ff5 (diff)
downloadop-kernel-dev-028d9b3cc62cb9dd31f1b5929edb3c23612cfccc.zip
op-kernel-dev-028d9b3cc62cb9dd31f1b5929edb3c23612cfccc.tar.gz
[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')
-rw-r--r--arch/s390/mm/init.c2
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++;
}
OpenPOWER on IntegriCloud