diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-11-30 13:06:51 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-12-11 06:34:09 -0500 |
commit | 2ea1d13f64efdf49319e86c87d9ba38c30902782 (patch) | |
tree | b55064cc0deb54ce23cc08208c54b31ca9e7b20a /arch/arm/kernel | |
parent | c4caa778157dbbf04116f0ac2111e389b5cd7a29 (diff) |
arm: add arch_mmap_check(), get rid of sys_arm_mremap()
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/calls.S | 2 | ||||
-rw-r--r-- | arch/arm/kernel/sys_arm.c | 25 |
2 files changed, 1 insertions, 26 deletions
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index f58c1156e779..9314a2d681f1 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -172,7 +172,7 @@ | |||
172 | /* 160 */ CALL(sys_sched_get_priority_min) | 172 | /* 160 */ CALL(sys_sched_get_priority_min) |
173 | CALL(sys_sched_rr_get_interval) | 173 | CALL(sys_sched_rr_get_interval) |
174 | CALL(sys_nanosleep) | 174 | CALL(sys_nanosleep) |
175 | CALL(sys_arm_mremap) | 175 | CALL(sys_mremap) |
176 | CALL(sys_setresuid16) | 176 | CALL(sys_setresuid16) |
177 | /* 165 */ CALL(sys_getresuid16) | 177 | /* 165 */ CALL(sys_getresuid16) |
178 | CALL(sys_ni_syscall) /* vm86 */ | 178 | CALL(sys_ni_syscall) /* vm86 */ |
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index 78ecaac65206..3b897444a9bd 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c | |||
@@ -28,10 +28,6 @@ | |||
28 | #include <linux/ipc.h> | 28 | #include <linux/ipc.h> |
29 | #include <linux/uaccess.h> | 29 | #include <linux/uaccess.h> |
30 | 30 | ||
31 | extern unsigned long do_mremap(unsigned long addr, unsigned long old_len, | ||
32 | unsigned long new_len, unsigned long flags, | ||
33 | unsigned long new_addr); | ||
34 | |||
35 | /* common code for old and new mmaps */ | 31 | /* common code for old and new mmaps */ |
36 | inline long do_mmap2( | 32 | inline long do_mmap2( |
37 | unsigned long addr, unsigned long len, | 33 | unsigned long addr, unsigned long len, |
@@ -43,9 +39,6 @@ inline long do_mmap2( | |||
43 | 39 | ||
44 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | 40 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); |
45 | 41 | ||
46 | if (flags & MAP_FIXED && addr < FIRST_USER_ADDRESS) | ||
47 | goto out; | ||
48 | |||
49 | error = -EBADF; | 42 | error = -EBADF; |
50 | if (!(flags & MAP_ANONYMOUS)) { | 43 | if (!(flags & MAP_ANONYMOUS)) { |
51 | file = fget(fd); | 44 | file = fget(fd); |
@@ -89,24 +82,6 @@ out: | |||
89 | return error; | 82 | return error; |
90 | } | 83 | } |
91 | 84 | ||
92 | asmlinkage unsigned long | ||
93 | sys_arm_mremap(unsigned long addr, unsigned long old_len, | ||
94 | unsigned long new_len, unsigned long flags, | ||
95 | unsigned long new_addr) | ||
96 | { | ||
97 | unsigned long ret = -EINVAL; | ||
98 | |||
99 | if (flags & MREMAP_FIXED && new_addr < FIRST_USER_ADDRESS) | ||
100 | goto out; | ||
101 | |||
102 | down_write(¤t->mm->mmap_sem); | ||
103 | ret = do_mremap(addr, old_len, new_len, flags, new_addr); | ||
104 | up_write(¤t->mm->mmap_sem); | ||
105 | |||
106 | out: | ||
107 | return ret; | ||
108 | } | ||
109 | |||
110 | /* | 85 | /* |
111 | * Perform the select(nd, in, out, ex, tv) and mmap() system | 86 | * Perform the select(nd, in, out, ex, tv) and mmap() system |
112 | * calls. | 87 | * calls. |