diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-05-11 12:59:32 +0200 | 
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-05-11 12:59:37 +0200 | 
| commit | 7961386fe9596e6bf03d09948a73c5df9653325b (patch) | |
| tree | 60fa2586a0d340ef8f7473956eef17430d8250c7 /fs/xfs/linux-2.6/xfs_ioctl.c | |
| parent | aa47b7e0f89b9998dad4d1667447e8cb7703ff4e (diff) | |
| parent | 091bf7624d1c90cec9e578a18529f615213ff847 (diff) | |
| download | olio-linux-3.10-7961386fe9596e6bf03d09948a73c5df9653325b.tar.xz olio-linux-3.10-7961386fe9596e6bf03d09948a73c5df9653325b.zip  | |
Merge commit 'v2.6.30-rc5' into sched/core
Merge reason: sched/core was on .30-rc1 before, update to latest fixes
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl.c')
| -rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 23 | 
1 files changed, 7 insertions, 16 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index d0b499418a7..34eaab608e6 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -489,17 +489,12 @@ xfs_attrmulti_attr_set(  	if (len > XATTR_SIZE_MAX)  		return EINVAL; -	kbuf = kmalloc(len, GFP_KERNEL); -	if (!kbuf) -		return ENOMEM; - -	if (copy_from_user(kbuf, ubuf, len)) -		goto out_kfree; +	kbuf = memdup_user(ubuf, len); +	if (IS_ERR(kbuf)) +		return PTR_ERR(kbuf);  	error = xfs_attr_set(XFS_I(inode), name, kbuf, len, flags); - out_kfree: -	kfree(kbuf);  	return error;  } @@ -540,20 +535,16 @@ xfs_attrmulti_by_handle(  	if (!size || size > 16 * PAGE_SIZE)  		goto out_dput; -	error = ENOMEM; -	ops = kmalloc(size, GFP_KERNEL); -	if (!ops) +	ops = memdup_user(am_hreq.ops, size); +	if (IS_ERR(ops)) { +		error = PTR_ERR(ops);  		goto out_dput; - -	error = EFAULT; -	if (copy_from_user(ops, 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,  |