compat: return -EFAULT on error in waitid()
[~shefty/rdma-dev.git] / kernel / compat.c
index 36700e9e2be9125f976963cb1fca4316460dee00..f4bddb90018614b878ae67ac8775ba0295e46cd1 100644 (file)
@@ -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);