Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106999
b: refs/heads/master
c: 5a3eb9f
h: refs/heads/master
i:
  106997: 53444dd
  106995: 67c214e
  106991: 2b372cb
v: v3
  • Loading branch information
Li Zefan authored and Linus Torvalds committed Jul 30, 2008
1 parent 4672d65 commit 6153336
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d1958f05095a7e9ecbba86235122784a3d1b561
refs/heads/master: 5a3eb9f6b7c598529f832b8baa6458ab1cbab2c6
7 changes: 5 additions & 2 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1424,14 +1424,17 @@ static ssize_t cgroup_write_string(struct cgroup *cgrp, struct cftype *cft,
if (buffer == NULL)
return -ENOMEM;
}
if (nbytes && copy_from_user(buffer, userbuf, nbytes))
return -EFAULT;
if (nbytes && copy_from_user(buffer, userbuf, nbytes)) {
retval = -EFAULT;
goto out;
}

buffer[nbytes] = 0; /* nul-terminate */
strstrip(buffer);
retval = cft->write_string(cgrp, cft, buffer);
if (!retval)
retval = nbytes;
out:
if (buffer != local_buffer)
kfree(buffer);
return retval;
Expand Down

0 comments on commit 6153336

Please sign in to comment.