Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207191
b: refs/heads/master
c: 90d7404
h: refs/heads/master
i:
  207189: de500df
  207187: f8d2d69
  207183: f5a44bb
v: v3
  • Loading branch information
Julia Lawall authored and Linus Torvalds committed Aug 10, 2010
1 parent f53a046 commit a9285ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: 9e58143dc08123c22c5b9f782b2913bd3a07a03d
refs/heads/master: 90d7404558fbe6f369d5e27b5ea3ef1e57562d3d
11 changes: 3 additions & 8 deletions trunk/mm/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,10 @@ char *strndup_user(const char __user *s, long n)
if (length > n)
return ERR_PTR(-EINVAL);

p = kmalloc(length, GFP_KERNEL);
p = memdup_user(s, length);

if (!p)
return ERR_PTR(-ENOMEM);

if (copy_from_user(p, s, length)) {
kfree(p);
return ERR_PTR(-EFAULT);
}
if (IS_ERR(p))
return p;

p[length - 1] = '\0';

Expand Down

0 comments on commit a9285ff

Please sign in to comment.