forked from Minki/linux
[PATCH] ppc64: poison initmem
Poison initmem after we free it so we catch use after free issues. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
2f4cf721eb
commit
4721e2214b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user