Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull sysctl fix from Al Viro: "Another regression fix for sysctl changes this cycle..." * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Call sysctl_head_finish on erroralistair/sunxi64-5.8
commit
8b082a41da
|
@ -566,8 +566,9 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *ubuf,
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* don't even try if the size is too large */
|
/* don't even try if the size is too large */
|
||||||
if (count > KMALLOC_MAX_SIZE)
|
error = -ENOMEM;
|
||||||
return -ENOMEM;
|
if (count >= KMALLOC_MAX_SIZE)
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (write) {
|
if (write) {
|
||||||
kbuf = memdup_user_nul(ubuf, count);
|
kbuf = memdup_user_nul(ubuf, count);
|
||||||
|
@ -576,7 +577,6 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *ubuf,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
error = -ENOMEM;
|
|
||||||
kbuf = kzalloc(count, GFP_KERNEL);
|
kbuf = kzalloc(count, GFP_KERNEL);
|
||||||
if (!kbuf)
|
if (!kbuf)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Reference in New Issue