aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/linux-2.6/xfs_ioctl32.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2009-04-30 15:36:52 +0000
committerSteve French <sfrench@us.ibm.com>2009-04-30 15:36:52 +0000
commit912bc6ae3de99c7bada4577d4341ace4ee59b5be (patch)
tree28fd1a4bb9e4b05aa833285b46df169f12c0e24d /fs/xfs/linux-2.6/xfs_ioctl32.c
parentd37dc42ab6f040b8f0f2962ab219c5b2accf748d (diff)
parent091438dd5668396328a3419abcbc6591159eb8d1 (diff)
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl32.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl32.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c
index c70c4e3db79..0882d166239 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.c
@@ -427,20 +427,16 @@ xfs_compat_attrmulti_by_handle(
if (!size || size > 16 * PAGE_SIZE)
goto out_dput;
- error = ENOMEM;
- ops = kmalloc(size, GFP_KERNEL);
- if (!ops)
+ ops = memdup_user(compat_ptr(am_hreq.ops), size);
+ if (IS_ERR(ops)) {
+ error = PTR_ERR(ops);
goto out_dput;
-
- error = EFAULT;
- if (copy_from_user(ops, compat_ptr(am_hreq.ops), size))
- goto out_kfree_ops;
+ }
attr_name = kmalloc(MAXNAMELEN, GFP_KERNEL);
if (!attr_name)
goto out_kfree_ops;
-
error = 0;
for (i = 0; i < am_hreq.opcount; i++) {
ops[i].am_error = strncpy_from_user(attr_name,