IA-32 support patch: mmap should return ENOMEM
Single Unix Specification says:
[ENOMEM] MAP_FIXED was specified, and the range [addr, addr + len) exceeds that allowed for the address space of a process.
Therefore if addr + len > IA32_PAGE_OFFSET, we should return ENOMEM.
Please apply to both 2.4 and 2.5.
-Arun
arch/ia64/ia32/sys_ia32.c renamed from arch/ia64/ia32/sys_ia32.c- +5 -0
@@ -448,7 +448,12 @@return addr;if (len >IA32_PAGE_OFFSET || addr >IA32_PAGE_OFFSET - len) + { +if (flags &MAP_FIXED ) +return -ENOMEM ; +else return -EINVAL ; + }if (OFFSET4K (offset))return -EINVAL ;
Bjorn Helgaas
AppliedQuoted 7 lines · Arun Sharma
Single Unix Specification says:
[ENOMEM]MAP_FIXEDwas specified, and the range [addr, addr + len) exceeds that allowed for the address space of a process.Therefore if addr + len >
IA32_PAGE_OFFSET, we should return ENOMEM.Please apply to both 2.4 and 2.5.
Applied to 2.4 (and David put it in 2.5 as well).