Skip to content

Commit

Permalink
[PATCH] ppc64: poison initmem
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Anton Blanchard authored and Paul Mackerras committed Sep 6, 2005
1 parent 2f4cf72 commit 4721e22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/ppc64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4721e22

Please sign in to comment.