Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199366
b: refs/heads/master
c: 767dcd4
h: refs/heads/master
v: v3
  • Loading branch information
Roland Dreier committed May 27, 2010
1 parent ad13bd5 commit b048aee
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: 7145c45a06e9c918ccf2d8b27b01409a98a67be7
refs/heads/master: 767dcd42e51c69be88f83683eda7883e522618fa
11 changes: 3 additions & 8 deletions trunk/drivers/infiniband/core/ucm.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,14 +706,9 @@ static int ib_ucm_alloc_data(const void **dest, u64 src, u32 len)
if (!len)
return 0;

data = kmalloc(len, GFP_KERNEL);
if (!data)
return -ENOMEM;

if (copy_from_user(data, (void __user *)(unsigned long)src, len)) {
kfree(data);
return -EFAULT;
}
data = memdup_user((void __user *)(unsigned long)src, len);
if (IS_ERR(data))
return PTR_ERR(data);

*dest = data;
return 0;
Expand Down

0 comments on commit b048aee

Please sign in to comment.