Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174851
b: refs/heads/master
c: 2ea1d13
h: refs/heads/master
i:
  174849: 3632dfa
  174847: e0e0ec0
v: v3
  • Loading branch information
Al Viro committed Dec 11, 2009
1 parent 5b1ea15 commit 894622e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4caa778157dbbf04116f0ac2111e389b5cd7a29
refs/heads/master: 2ea1d13f64efdf49319e86c87d9ba38c30902782
3 changes: 3 additions & 0 deletions trunk/arch/arm/include/asm/mman.h
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#include <asm-generic/mman.h>

#define arch_mmap_check(addr, len, flags) \
(((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0)
2 changes: 1 addition & 1 deletion trunk/arch/arm/kernel/calls.S
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
/* 160 */ CALL(sys_sched_get_priority_min)
CALL(sys_sched_rr_get_interval)
CALL(sys_nanosleep)
CALL(sys_arm_mremap)
CALL(sys_mremap)
CALL(sys_setresuid16)
/* 165 */ CALL(sys_getresuid16)
CALL(sys_ni_syscall) /* vm86 */
Expand Down
25 changes: 0 additions & 25 deletions trunk/arch/arm/kernel/sys_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
#include <linux/ipc.h>
#include <linux/uaccess.h>

extern unsigned long do_mremap(unsigned long addr, unsigned long old_len,
unsigned long new_len, unsigned long flags,
unsigned long new_addr);

/* common code for old and new mmaps */
inline long do_mmap2(
unsigned long addr, unsigned long len,
Expand All @@ -43,9 +39,6 @@ inline long do_mmap2(

flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);

if (flags & MAP_FIXED && addr < FIRST_USER_ADDRESS)
goto out;

error = -EBADF;
if (!(flags & MAP_ANONYMOUS)) {
file = fget(fd);
Expand Down Expand Up @@ -89,24 +82,6 @@ asmlinkage int old_mmap(struct mmap_arg_struct __user *arg)
return error;
}

asmlinkage unsigned long
sys_arm_mremap(unsigned long addr, unsigned long old_len,
unsigned long new_len, unsigned long flags,
unsigned long new_addr)
{
unsigned long ret = -EINVAL;

if (flags & MREMAP_FIXED && new_addr < FIRST_USER_ADDRESS)
goto out;

down_write(&current->mm->mmap_sem);
ret = do_mremap(addr, old_len, new_len, flags, new_addr);
up_write(&current->mm->mmap_sem);

out:
return ret;
}

/*
* Perform the select(nd, in, out, ex, tv) and mmap() system
* calls.
Expand Down

0 comments on commit 894622e

Please sign in to comment.