diff options
author | Helge Deller <deller@parisc-linux.org> | 2006-01-15 14:11:50 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@duet.int.mcmartin.ca> | 2006-01-22 20:26:55 -0500 |
commit | 81a3de3efd61c2483a303cf0b6227525d2f28df7 (patch) | |
tree | 038a7c16bab46260fa2e9cce6890ab4e042fc332 /arch/parisc | |
parent | 1bcdd8548286743e1d6b3d53c96a90c6da975620 (diff) |
[PARISC] Use DEBUG_KERNEL to catch used-after-free __init data
Use CONFIG_DEBUG_KERNEL to catch kernel code which tries to access
__init data after it is freed. When CONFIG_DEBUG_KERNEL is not set
this also cleans up a WARN_ON at boot time. Also remove some dead
code from mm/init.c
Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/mm/init.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 6f36d0b17d9e..7847ca13d6c2 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -371,17 +371,11 @@ static void __init setup_bootmem(void) | |||
371 | 371 | ||
372 | void free_initmem(void) | 372 | void free_initmem(void) |
373 | { | 373 | { |
374 | /* FIXME: */ | ||
375 | #if 0 | ||
376 | printk(KERN_INFO "NOT FREEING INITMEM (%dk)\n", | ||
377 | (&__init_end - &__init_begin) >> 10); | ||
378 | return; | ||
379 | #else | ||
380 | unsigned long addr; | 374 | unsigned long addr; |
381 | 375 | ||
382 | printk(KERN_INFO "Freeing unused kernel memory: "); | 376 | printk(KERN_INFO "Freeing unused kernel memory: "); |
383 | 377 | ||
384 | #if 1 | 378 | #ifdef CONFIG_DEBUG_KERNEL |
385 | /* Attempt to catch anyone trying to execute code here | 379 | /* Attempt to catch anyone trying to execute code here |
386 | * by filling the page with BRK insns. | 380 | * by filling the page with BRK insns. |
387 | * | 381 | * |
@@ -414,7 +408,6 @@ void free_initmem(void) | |||
414 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE); | 408 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE); |
415 | 409 | ||
416 | printk("%luk freed\n", (unsigned long)(&__init_end - &__init_begin) >> 10); | 410 | printk("%luk freed\n", (unsigned long)(&__init_end - &__init_begin) >> 10); |
417 | #endif | ||
418 | } | 411 | } |
419 | 412 | ||
420 | 413 | ||