Loading fs/sysfs/bin.c +3 −10 Original line number Diff line number Diff line Loading @@ -157,14 +157,9 @@ static ssize_t write(struct file *file, const char __user *userbuf, count = size - offs; } temp = kmalloc(count, GFP_KERNEL); if (!temp) return -ENOMEM; if (copy_from_user(temp, userbuf, count)) { count = -EFAULT; goto out_free; } temp = memdup_user(userbuf, count); if (IS_ERR(temp)) return PTR_ERR(temp); mutex_lock(&bb->mutex); Loading @@ -176,8 +171,6 @@ static ssize_t write(struct file *file, const char __user *userbuf, if (count > 0) *off = offs + count; out_free: kfree(temp); return count; } Loading Loading
fs/sysfs/bin.c +3 −10 Original line number Diff line number Diff line Loading @@ -157,14 +157,9 @@ static ssize_t write(struct file *file, const char __user *userbuf, count = size - offs; } temp = kmalloc(count, GFP_KERNEL); if (!temp) return -ENOMEM; if (copy_from_user(temp, userbuf, count)) { count = -EFAULT; goto out_free; } temp = memdup_user(userbuf, count); if (IS_ERR(temp)) return PTR_ERR(temp); mutex_lock(&bb->mutex); Loading @@ -176,8 +171,6 @@ static ssize_t write(struct file *file, const char __user *userbuf, if (count > 0) *off = offs + count; out_free: kfree(temp); return count; } Loading