--- linux-2.6.25.3.old/arch/sparc/kernel/sys_sparc.c 2008-05-12 11:43:17.000000000 +0200 +++ linux-2.6.25.3/arch/sparc/kernel/sys_sparc.c 2008-05-12 12:20:32.000000000 +0200 @@ -308,14 +308,13 @@ new_len > TASK_SIZE - PAGE_SIZE) goto out; down_write(¤t->mm->mmap_sem); - if (flags & MREMAP_FIXED) { - if (ARCH_SUN4C_SUN4 && - new_addr < 0xe0000000 && - new_addr + new_len > 0x20000000) - goto out_sem; - if (new_addr + new_len > TASK_SIZE - PAGE_SIZE) - goto out_sem; - } else if ((ARCH_SUN4C_SUN4 && addr < 0xe0000000 && + if (ARCH_SUN4C_SUN4 && + new_addr < 0xe0000000 && + new_addr + new_len > 0x20000000) + goto out_sem; + if (new_addr + new_len > TASK_SIZE - PAGE_SIZE) + goto out_sem; + else if ((ARCH_SUN4C_SUN4 && addr < 0xe0000000 && addr + new_len > 0x20000000) || addr + new_len > TASK_SIZE - PAGE_SIZE) { unsigned long map_flags = 0;