Commit dac8853b authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] Problems disabling SYSCTL

Create a cond_syscall for sys32_sysctl and make all architectures use it.
Also fix the architectures that dont wrap their 32bit compat sysctl code.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 017568f3
......@@ -1973,10 +1973,10 @@ struct sysctl32 {
unsigned int __unused[4];
};
#ifdef CONFIG_SYSCTL
asmlinkage long
sys32_sysctl (struct sysctl32 __user *args)
{
#ifdef CONFIG_SYSCTL
struct sysctl32 a32;
mm_segment_t old_fs = get_fs ();
void __user *oldvalp, *newvalp;
......@@ -2015,10 +2015,8 @@ sys32_sysctl (struct sysctl32 __user *args)
return -EFAULT;
return ret;
#else
return -ENOSYS;
#endif
}
#endif
asmlinkage long
sys32_newuname (struct new_utsname __user *name)
......
......@@ -1192,13 +1192,6 @@ asmlinkage long sys32_sysctl(struct sysctl_args32 *args)
return error;
}
#else /* CONFIG_SYSCTL */
asmlinkage long sys32_sysctl(struct sysctl_args32 *args)
{
return -ENOSYS;
}
#endif /* CONFIG_SYSCTL */
asmlinkage long sys32_newuname(struct new_utsname * name)
......
......@@ -165,12 +165,6 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 *args)
return error;
}
#else /* CONFIG_SYSCTL */
asmlinkage long sys32_sysctl(struct __sysctl_args *args)
{
return -ENOSYS;
}
#endif /* CONFIG_SYSCTL */
asmlinkage long sys32_sched_rr_get_interval(pid_t pid,
......
......@@ -1106,6 +1106,7 @@ asmlinkage long sys32_umask(u32 mask)
return sys_umask((int)mask);
}
#ifdef CONFIG_SYSCTL
struct __sysctl_args32 {
u32 name;
int nlen;
......@@ -1155,6 +1156,7 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
}
return error;
}
#endif
asmlinkage int sys32_olduname(struct oldold_utsname __user * name)
{
......
......@@ -906,6 +906,7 @@ asmlinkage long sys32_adjtimex(struct timex32 *utp)
return ret;
}
#ifdef CONFIG_SYSCTL
struct __sysctl_args32 {
u32 name;
int nlen;
......@@ -953,6 +954,7 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 *args)
}
return error;
}
#endif
struct stat64_emu31 {
unsigned long long st_dev;
......
......@@ -653,6 +653,7 @@ sys32_pause(void)
}
#ifdef CONFIG_SYSCTL
struct sysctl_ia32 {
unsigned int name;
int nlen;
......@@ -667,9 +668,6 @@ struct sysctl_ia32 {
asmlinkage long
sys32_sysctl(struct sysctl_ia32 __user *args32)
{
#ifndef CONFIG_SYSCTL
return -ENOSYS;
#else
struct sysctl_ia32 a32;
mm_segment_t old_fs = get_fs ();
void *oldvalp, *newvalp;
......@@ -710,8 +708,8 @@ sys32_sysctl(struct sysctl_ia32 __user *args32)
return -EFAULT;
return ret;
#endif
}
#endif
/* warning: next two assume little endian */
asmlinkage long
......
......@@ -82,3 +82,4 @@ cond_syscall(sys_pciconfig_read)
cond_syscall(sys_pciconfig_write)
cond_syscall(sys_pciconfig_iobase)
cond_syscall(sys32_ipc)
cond_syscall(sys32_sysctl)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment