diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-29 12:46:59 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-29 12:47:05 (GMT) |
commit | e7fd5d4b3d240f42c30a9e3d20a4689c4d3a795a (patch) | |
tree | 4ba588631dd8189a818a91c9e3976526071178b6 /fs/xattr.c | |
parent | 1130b0296184bc21806225fd06d533515a99d2db (diff) | |
parent | 56a50adda49b2020156616c4eb15353e0f9ad7de (diff) | |
download | linux-fsl-qoriq-e7fd5d4b3d240f42c30a9e3d20a4689c4d3a795a.tar.xz |
Merge branch 'linus' into perfcounters/core
Merge reason: This brach was on -rc1, refresh it to almost-rc4 to pick up
the latest upstream fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/xattr.c')
-rw-r--r-- | fs/xattr.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -237,13 +237,9 @@ setxattr(struct dentry *d, const char __user *name, const void __user *value, if (size) { if (size > XATTR_SIZE_MAX) return -E2BIG; - kvalue = kmalloc(size, GFP_KERNEL); - if (!kvalue) - return -ENOMEM; - if (copy_from_user(kvalue, value, size)) { - kfree(kvalue); - return -EFAULT; - } + kvalue = memdup_user(value, size); + if (IS_ERR(kvalue)) + return PTR_ERR(kvalue); } error = vfs_setxattr(d, kname, kvalue, size, flags); |