compat: return -EFAULT on error in waitid()
PATCH 1/1 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.
Signed-off-by Dan Carpenter <[email protected]>
---
Only needed in linux-next.
kernel/compat.c +1 -1
@@ -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);