* [patch] compat: return -EFAULT on error in waitid()
@ 2013-01-04 18:54 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-01-04 18:54 UTC (permalink / raw)
To: Al Viro
Cc: Andrew Morton, David S. Miller, Jan Kiszka, Chris Metcalf,
linux-kernel, kernel-janitors
The copy_to_user() call returns the number of bytes remaining but we
want to return -EFAULT on error.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Only needed in linux-next.
diff --git a/kernel/compat.c b/kernel/compat.c
index de6f324..19971d8 100644
--- a/kernel/compat.c
+++ b/kernel/compat.c
@@ -593,7 +593,7 @@ COMPAT_SYSCALL_DEFINE5(waitid,
else
ret = put_compat_rusage(&ru, uru);
if (ret)
- return ret;
+ return -EFAULT;
}
BUG_ON(info.si_code & __SI_MASK);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-04 18:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-04 18:54 [patch] compat: return -EFAULT on error in waitid() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox