aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-11-24 08:53:51 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-12-11 06:34:09 -0500
commit0ec62d290912bb4b989be7563851bc364ec73b56 (patch)
treea014d5abbb7573a63537779ccbda0c6962554f04 /arch/sparc
parent935874141df839c706cd6cdc438e85eb69d1525e (diff)
kill useless checks in sparc mremap variants
Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/sys_sparc32.c22
-rw-r--r--arch/sparc/kernel/sys_sparc_32.c21
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c6
-rw-r--r--arch/sparc/kernel/systbls_32.S2
-rw-r--r--arch/sparc/kernel/systbls_64.S2
5 files changed, 2 insertions, 51 deletions
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c
index 00abe87e5b51..dc0ac197e7e2 100644
--- a/arch/sparc/kernel/sys_sparc32.c
+++ b/arch/sparc/kernel/sys_sparc32.c
@@ -564,28 +564,6 @@ asmlinkage long sparc32_open(const char __user *filename,
564 return do_sys_open(AT_FDCWD, filename, flags, mode); 564 return do_sys_open(AT_FDCWD, filename, flags, mode);
565} 565}
566 566
567extern unsigned long do_mremap(unsigned long addr,
568 unsigned long old_len, unsigned long new_len,
569 unsigned long flags, unsigned long new_addr);
570
571asmlinkage unsigned long sys32_mremap(unsigned long addr,
572 unsigned long old_len, unsigned long new_len,
573 unsigned long flags, u32 __new_addr)
574{
575 unsigned long ret = -EINVAL;
576 unsigned long new_addr = __new_addr;
577
578 if (unlikely(sparc_mmap_check(addr, old_len)))
579 goto out;
580 if (unlikely(sparc_mmap_check(new_addr, new_len)))
581 goto out;
582 down_write(&current->mm->mmap_sem);
583 ret = do_mremap(addr, old_len, new_len, flags, new_addr);
584 up_write(&current->mm->mmap_sem);
585out:
586 return ret;
587}
588
589long sys32_lookup_dcookie(unsigned long cookie_high, 567long sys32_lookup_dcookie(unsigned long cookie_high,
590 unsigned long cookie_low, 568 unsigned long cookie_low,
591 char __user *buf, size_t len) 569 char __user *buf, size_t len)
diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c
index 03035c852a43..10c43bea32c7 100644
--- a/arch/sparc/kernel/sys_sparc_32.c
+++ b/arch/sparc/kernel/sys_sparc_32.c
@@ -287,27 +287,6 @@ long sparc_remap_file_pages(unsigned long start, unsigned long size,
287 (pgoff >> (PAGE_SHIFT - 12)), flags); 287 (pgoff >> (PAGE_SHIFT - 12)), flags);
288} 288}
289 289
290extern unsigned long do_mremap(unsigned long addr,
291 unsigned long old_len, unsigned long new_len,
292 unsigned long flags, unsigned long new_addr);
293
294asmlinkage unsigned long sparc_mremap(unsigned long addr,
295 unsigned long old_len, unsigned long new_len,
296 unsigned long flags, unsigned long new_addr)
297{
298 unsigned long ret = -EINVAL;
299
300 if (unlikely(sparc_mmap_check(addr, old_len)))
301 goto out;
302 if (unlikely(sparc_mmap_check(new_addr, new_len)))
303 goto out;
304 down_write(&current->mm->mmap_sem);
305 ret = do_mremap(addr, old_len, new_len, flags, new_addr);
306 up_write(&current->mm->mmap_sem);
307out:
308 return ret;
309}
310
311/* we come to here via sys_nis_syscall so it can setup the regs argument */ 290/* we come to here via sys_nis_syscall so it can setup the regs argument */
312asmlinkage unsigned long 291asmlinkage unsigned long
313c_sys_nis_syscall (struct pt_regs *regs) 292c_sys_nis_syscall (struct pt_regs *regs)
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index e2d102447a43..ddda12fcbac2 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -614,12 +614,6 @@ SYSCALL_DEFINE5(64_mremap, unsigned long, addr, unsigned long, old_len,
614 614
615 if (test_thread_flag(TIF_32BIT)) 615 if (test_thread_flag(TIF_32BIT))
616 goto out; 616 goto out;
617 if (unlikely(new_len >= VA_EXCLUDE_START))
618 goto out;
619 if (unlikely(sparc_mmap_check(addr, old_len)))
620 goto out;
621 if (unlikely(sparc_mmap_check(new_addr, new_len)))
622 goto out;
623 617
624 down_write(&current->mm->mmap_sem); 618 down_write(&current->mm->mmap_sem);
625 ret = do_mremap(addr, old_len, new_len, flags, new_addr); 619 ret = do_mremap(addr, old_len, new_len, flags, new_addr);
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S
index ceb1530f8aa6..3a66765ade58 100644
--- a/arch/sparc/kernel/systbls_32.S
+++ b/arch/sparc/kernel/systbls_32.S
@@ -67,7 +67,7 @@ sys_call_table:
67/*235*/ .long sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall 67/*235*/ .long sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
68/*240*/ .long sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler 68/*240*/ .long sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
69/*245*/ .long sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep 69/*245*/ .long sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep
70/*250*/ .long sparc_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl 70/*250*/ .long sys_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl
71/*255*/ .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep 71/*255*/ .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
72/*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun 72/*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun
73/*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy 73/*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S
index cc8e7862e95a..0648a087810a 100644
--- a/arch/sparc/kernel/systbls_64.S
+++ b/arch/sparc/kernel/systbls_64.S
@@ -68,7 +68,7 @@ sys_call_table32:
68 .word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys32_mlockall 68 .word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys32_mlockall
69/*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler 69/*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler
70 .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep 70 .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep
71/*250*/ .word sys32_mremap, compat_sys_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl 71/*250*/ .word sys_mremap, compat_sys_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl
72 .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep 72 .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
73/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun 73/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun
74 .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy 74 .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy