patch-2.4.13 linux/arch/sh/kernel/sys_sh.c
Next file: linux/arch/sh/lib/memchr.S
Previous file: linux/arch/sh/kernel/signal.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Mon Oct 15 13:36:48 2001
- Orig file:
v2.4.12/linux/arch/sh/kernel/sys_sh.c
- Orig date:
Sun Sep 23 11:40:56 2001
diff -u --recursive --new-file v2.4.12/linux/arch/sh/kernel/sys_sh.c linux/arch/sh/kernel/sys_sh.c
@@ -68,7 +68,10 @@
if (!addr)
addr = TASK_UNMAPPED_BASE;
- addr = COLOUR_ALIGN(addr);
+ if (flags & MAP_PRIVATE)
+ addr = PAGE_ALIGN(addr);
+ else
+ addr = COLOUR_ALIGN(addr);
for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) {
/* At this point: (!vma || addr < vma->vm_end). */
@@ -77,7 +80,8 @@
if (!vma || addr + len <= vma->vm_start)
return addr;
addr = vma->vm_end;
- addr = COLOUR_ALIGN(addr);
+ if (!(flags & MAP_PRIVATE))
+ addr = COLOUR_ALIGN(addr);
}
}
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)