diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-02-21 19:41:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:22:16 -0500 |
commit | bffea77c08c361d174af7ad94887f6aecc3f340b (patch) | |
tree | ffe22fc5274c4398be4bd8597292a84ca7b9295d /kernel/compat.c | |
parent | 9a8ab1c39970a4938a72d94e6fd13be88a797590 (diff) |
compat: return -EFAULT on error in waitid()
The copy_to_user() call returns the number of bytes remaining but we
want to return -EFAULT on error.
Fixes "x32: fix waitid()"
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/compat.c')
-rw-r--r-- | kernel/compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index 36700e9e2be9..f4bddb900186 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -593,7 +593,7 @@ COMPAT_SYSCALL_DEFINE5(waitid, | |||
593 | else | 593 | else |
594 | ret = put_compat_rusage(&ru, uru); | 594 | ret = put_compat_rusage(&ru, uru); |
595 | if (ret) | 595 | if (ret) |
596 | return ret; | 596 | return -EFAULT; |
597 | } | 597 | } |
598 | 598 | ||
599 | BUG_ON(info.si_code & __SI_MASK); | 599 | BUG_ON(info.si_code & __SI_MASK); |