diff options
Diffstat (limited to 'arch/sparc/kernel/sys_sparc32.c')
-rw-r--r-- | arch/sparc/kernel/sys_sparc32.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c index 04e28b2671c8..00abe87e5b51 100644 --- a/arch/sparc/kernel/sys_sparc32.c +++ b/arch/sparc/kernel/sys_sparc32.c | |||
@@ -26,11 +26,6 @@ | |||
26 | #include <linux/nfs_fs.h> | 26 | #include <linux/nfs_fs.h> |
27 | #include <linux/quota.h> | 27 | #include <linux/quota.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/sunrpc/svc.h> | ||
30 | #include <linux/nfsd/nfsd.h> | ||
31 | #include <linux/nfsd/cache.h> | ||
32 | #include <linux/nfsd/xdr.h> | ||
33 | #include <linux/nfsd/syscall.h> | ||
34 | #include <linux/poll.h> | 29 | #include <linux/poll.h> |
35 | #include <linux/personality.h> | 30 | #include <linux/personality.h> |
36 | #include <linux/stat.h> | 31 | #include <linux/stat.h> |
@@ -591,63 +586,6 @@ out: | |||
591 | return ret; | 586 | return ret; |
592 | } | 587 | } |
593 | 588 | ||
594 | struct __sysctl_args32 { | ||
595 | u32 name; | ||
596 | int nlen; | ||
597 | u32 oldval; | ||
598 | u32 oldlenp; | ||
599 | u32 newval; | ||
600 | u32 newlen; | ||
601 | u32 __unused[4]; | ||
602 | }; | ||
603 | |||
604 | asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) | ||
605 | { | ||
606 | #ifndef CONFIG_SYSCTL_SYSCALL | ||
607 | return -ENOSYS; | ||
608 | #else | ||
609 | struct __sysctl_args32 tmp; | ||
610 | int error; | ||
611 | size_t oldlen, __user *oldlenp = NULL; | ||
612 | unsigned long addr = (((unsigned long)&args->__unused[0]) + 7UL) & ~7UL; | ||
613 | |||
614 | if (copy_from_user(&tmp, args, sizeof(tmp))) | ||
615 | return -EFAULT; | ||
616 | |||
617 | if (tmp.oldval && tmp.oldlenp) { | ||
618 | /* Duh, this is ugly and might not work if sysctl_args | ||
619 | is in read-only memory, but do_sysctl does indirectly | ||
620 | a lot of uaccess in both directions and we'd have to | ||
621 | basically copy the whole sysctl.c here, and | ||
622 | glibc's __sysctl uses rw memory for the structure | ||
623 | anyway. */ | ||
624 | if (get_user(oldlen, (u32 __user *)(unsigned long)tmp.oldlenp) || | ||
625 | put_user(oldlen, (size_t __user *)addr)) | ||
626 | return -EFAULT; | ||
627 | oldlenp = (size_t __user *)addr; | ||
628 | } | ||
629 | |||
630 | lock_kernel(); | ||
631 | error = do_sysctl((int __user *)(unsigned long) tmp.name, | ||
632 | tmp.nlen, | ||
633 | (void __user *)(unsigned long) tmp.oldval, | ||
634 | oldlenp, | ||
635 | (void __user *)(unsigned long) tmp.newval, | ||
636 | tmp.newlen); | ||
637 | unlock_kernel(); | ||
638 | if (oldlenp) { | ||
639 | if (!error) { | ||
640 | if (get_user(oldlen, (size_t __user *)addr) || | ||
641 | put_user(oldlen, (u32 __user *)(unsigned long) tmp.oldlenp)) | ||
642 | error = -EFAULT; | ||
643 | } | ||
644 | if (copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused))) | ||
645 | error = -EFAULT; | ||
646 | } | ||
647 | return error; | ||
648 | #endif | ||
649 | } | ||
650 | |||
651 | long sys32_lookup_dcookie(unsigned long cookie_high, | 589 | long sys32_lookup_dcookie(unsigned long cookie_high, |
652 | unsigned long cookie_low, | 590 | unsigned long cookie_low, |
653 | char __user *buf, size_t len) | 591 | char __user *buf, size_t len) |