Commit d79efc1e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] remove unneeded check from sys_sysctl()

That check I just added to sys_sysctl() is not needed: do_sysctl() checks as
well.
parent 4397e63e
......@@ -904,9 +904,6 @@ asmlinkage long sys_sysctl(struct __sysctl_args __user *args)
if (copy_from_user(&tmp, args, sizeof(tmp)))
return -EFAULT;
if (tmp.nlen < 0 || tmp.nlen > CTL_MAXNAME)
return -EINVAL;
lock_kernel();
error = do_sysctl(tmp.name, tmp.nlen, tmp.oldval, tmp.oldlenp,
tmp.newval, tmp.newlen);
......
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