diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-04 21:12:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-04 21:12:39 -0700 |
commit | 7f0d384cafabfbb56663ee6944c18fc0450fc5d6 (patch) | |
tree | bf68721fb65b64392177f498a9ba61ef027b2b3d /fs/fcntl.c | |
parent | 90ec7819737d42a0ad1c2df1ff56016facae3c6e (diff) | |
parent | 01afaf61983d08ed1c9e5e8f2fcf4f40e9008033 (diff) | |
download | op-kernel-dev-7f0d384cafabfbb56663ee6944c18fc0450fc5d6.zip op-kernel-dev-7f0d384cafabfbb56663ee6944c18fc0450fc5d6.tar.gz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
Minix: Clean up left over label
fix truncate inode time modification breakage
fix setattr error handling in sysfs, configfs
fcntl: return -EFAULT if copy_to_user fails
wrong type for 'magic' argument in simple_fill_super()
fix the deadlock in qib_fs
mqueue doesn't need make_bad_inode()
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r-- | fs/fcntl.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -274,7 +274,7 @@ static int f_setown_ex(struct file *filp, unsigned long arg) ret = copy_from_user(&owner, owner_p, sizeof(owner)); if (ret) - return ret; + return -EFAULT; switch (owner.type) { case F_OWNER_TID: @@ -332,8 +332,11 @@ static int f_getown_ex(struct file *filp, unsigned long arg) } read_unlock(&filp->f_owner.lock); - if (!ret) + if (!ret) { ret = copy_to_user(owner_p, &owner, sizeof(owner)); + if (ret) + ret = -EFAULT; + } return ret; } |