Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
[sfrench/cifs-2.6.git] / arch / powerpc / kernel / sys_ppc32.c
index b97c2d67f4ac38d5ece9f0e8f002db8b7648b0f2..c5a4732bcc48d934b20b3f725bd642c36c35cc68 100644 (file)
@@ -520,58 +520,6 @@ asmlinkage long compat_sys_umask(u32 mask)
        return sys_umask((int)mask);
 }
 
-#ifdef CONFIG_SYSCTL_SYSCALL
-struct __sysctl_args32 {
-       u32 name;
-       int nlen;
-       u32 oldval;
-       u32 oldlenp;
-       u32 newval;
-       u32 newlen;
-       u32 __unused[4];
-};
-
-asmlinkage long compat_sys_sysctl(struct __sysctl_args32 __user *args)
-{
-       struct __sysctl_args32 tmp;
-       int error;
-       size_t oldlen;
-       size_t __user *oldlenp = NULL;
-       unsigned long addr = (((unsigned long)&args->__unused[0]) + 7) & ~7;
-
-       if (copy_from_user(&tmp, args, sizeof(tmp)))
-               return -EFAULT;
-
-       if (tmp.oldval && tmp.oldlenp) {
-               /* Duh, this is ugly and might not work if sysctl_args
-                  is in read-only memory, but do_sysctl does indirectly
-                  a lot of uaccess in both directions and we'd have to
-                  basically copy the whole sysctl.c here, and
-                  glibc's __sysctl uses rw memory for the structure
-                  anyway.  */
-               oldlenp = (size_t __user *)addr;
-               if (get_user(oldlen, (compat_size_t __user *)compat_ptr(tmp.oldlenp)) ||
-                   put_user(oldlen, oldlenp))
-                       return -EFAULT;
-       }
-
-       lock_kernel();
-       error = do_sysctl(compat_ptr(tmp.name), tmp.nlen,
-                         compat_ptr(tmp.oldval), oldlenp,
-                         compat_ptr(tmp.newval), tmp.newlen);
-       unlock_kernel();
-       if (oldlenp) {
-               if (!error) {
-                       if (get_user(oldlen, oldlenp) ||
-                           put_user(oldlen, (compat_size_t __user *)compat_ptr(tmp.oldlenp)))
-                               error = -EFAULT;
-               }
-               copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused));
-       }
-       return error;
-}
-#endif
-
 unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
                          unsigned long prot, unsigned long flags,
                          unsigned long fd, unsigned long pgoff)