diff options
-rw-r--r-- | arch/sparc/mm/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index c13e6cd279ac..a1bef07755a9 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c | |||
@@ -206,7 +206,8 @@ unsigned long __init bootmem_init(unsigned long *pages_avail) | |||
206 | #ifdef CONFIG_BLK_DEV_INITRD | 206 | #ifdef CONFIG_BLK_DEV_INITRD |
207 | /* Now have to check initial ramdisk, so that bootmap does not overwrite it */ | 207 | /* Now have to check initial ramdisk, so that bootmap does not overwrite it */ |
208 | if (sparc_ramdisk_image) { | 208 | if (sparc_ramdisk_image) { |
209 | sparc_ramdisk_image -= KERNBASE; | 209 | if (sparc_ramdisk_image >= (unsigned long)&_end - 2 * PAGE_SIZE) |
210 | sparc_ramdisk_image -= KERNBASE; | ||
210 | initrd_start = sparc_ramdisk_image + phys_base; | 211 | initrd_start = sparc_ramdisk_image + phys_base; |
211 | initrd_end = initrd_start + sparc_ramdisk_size; | 212 | initrd_end = initrd_start + sparc_ramdisk_size; |
212 | if (initrd_end > end_of_phys_memory) { | 213 | if (initrd_end > end_of_phys_memory) { |