From: Oleg Nesterov Date: Mon, 23 May 2016 23:23:53 +0000 (-0700) Subject: wait: allow sys_waitid() to accept __WNOTHREAD/__WCLONE/__WALL X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=91c4e8ea8f05916df0c8a6f383508ac7c9e10dba;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git wait: allow sys_waitid() to accept __WNOTHREAD/__WCLONE/__WALL I see no reason why waitid() can't support other linux-specific flags allowed in sys_wait4(). In particular this change can help if we reconsider the previous change ("wait/ptrace: assume __WALL if the child is traced") which adds the "automagical" __WALL for debugger. Signed-off-by: Oleg Nesterov Cc: Dmitry Vyukov Cc: Denys Vlasenko Cc: Jan Kratochvil Cc: "Michael Kerrisk (man-pages)" Cc: Pedro Alves Cc: Roland McGrath Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/exit.c b/kernel/exit.c index 44fbe6edd7fe..9e6e1356e6bb 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1535,7 +1535,8 @@ SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *, enum pid_type type; long ret; - if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED)) + if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED| + __WNOTHREAD|__WCLONE|__WALL)) return -EINVAL; if (!(options & (WEXITED|WSTOPPED|WCONTINUED))) return -EINVAL;