Loading fs/proc/proc_sysctl.c +3 −3 Original line number Diff line number Diff line Loading @@ -566,8 +566,9 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *ubuf, goto out; /* don't even try if the size is too large */ if (count > KMALLOC_MAX_SIZE) return -ENOMEM; error = -ENOMEM; if (count >= KMALLOC_MAX_SIZE) goto out; if (write) { kbuf = memdup_user_nul(ubuf, count); Loading @@ -576,7 +577,6 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *ubuf, goto out; } } else { error = -ENOMEM; kbuf = kzalloc(count, GFP_KERNEL); if (!kbuf) goto out; Loading Loading
fs/proc/proc_sysctl.c +3 −3 Original line number Diff line number Diff line Loading @@ -566,8 +566,9 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *ubuf, goto out; /* don't even try if the size is too large */ if (count > KMALLOC_MAX_SIZE) return -ENOMEM; error = -ENOMEM; if (count >= KMALLOC_MAX_SIZE) goto out; if (write) { kbuf = memdup_user_nul(ubuf, count); Loading @@ -576,7 +577,6 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *ubuf, goto out; } } else { error = -ENOMEM; kbuf = kzalloc(count, GFP_KERNEL); if (!kbuf) goto out; Loading