]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] __init poisoning for i386
authorPavel Machek <pavel@ucw.cz>
Wed, 20 Oct 2004 01:38:15 +0000 (18:38 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 20 Oct 2004 01:38:15 +0000 (18:38 -0700)
Overwrite __init section so calls to __init functions from normal code
are caught, reliably.

(Plus a fix from Dave Hansen)

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/mm/init.c

index 0ce0e6a81e206796f0dbe6b07148f931b0c8cc07..73bed3db4814848f51026492a1182d6c60adc853 100644 (file)
@@ -704,6 +704,7 @@ void free_initmem(void)
        for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) {
                ClearPageReserved(virt_to_page(addr));
                set_page_count(virt_to_page(addr), 1);
+               memset((void *)addr, 0xcc, PAGE_SIZE);
                free_page(addr);
                totalram_pages++;
        }