Commit 20a7cd3d authored by David Mosberger's avatar David Mosberger

ia64: Make mremap() work properly when returning "negative" addresses.

	Based on patch by Matt Chapman.
parent 50155729
......@@ -1160,7 +1160,7 @@ sys_call_table:
data8 sys_mlock
data8 sys_mlockall
data8 sys_mprotect // 1155
data8 sys_mremap
data8 ia64_mremap
data8 sys_msync
data8 sys_munlock
data8 sys_munlockall
......
......@@ -316,6 +316,29 @@ sys_free_hugepages (unsigned long addr)
#endif /* !CONFIG_HUGETLB_PAGE */
asmlinkage unsigned long
ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags,
unsigned long new_addr)
{
extern unsigned long do_mremap (unsigned long addr,
unsigned long old_len,
unsigned long new_len,
unsigned long flags,
unsigned long new_addr);
down_write(&current->mm->mmap_sem);
{
addr = do_mremap(addr, old_len, new_len, flags, new_addr);
}
up_write(&current->mm->mmap_sem);
if (IS_ERR((void *) addr))
return addr;
force_successful_syscall_return();
return addr;
}
asmlinkage long
sys_vm86 (long arg0, long arg1, long arg2, long arg3)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment