diff options
author | Oleg Nesterov <oleg@redhat.com> | 2016-05-23 19:23:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-23 20:04:14 -0400 |
commit | 91c4e8ea8f05916df0c8a6f383508ac7c9e10dba (patch) | |
tree | 005f573a07013f8ece804b2792efd457e06ba764 | |
parent | bf959931ddb88c4e4366e96dd22e68fa0db9527c (diff) |
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 <oleg@redhat.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Cc: Pedro Alves <palves@redhat.com>
Cc: Roland McGrath <roland@hack.frob.com>
Cc: <syzkaller@googlegroups.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/exit.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 *, | |||
1535 | enum pid_type type; | 1535 | enum pid_type type; |
1536 | long ret; | 1536 | long ret; |
1537 | 1537 | ||
1538 | if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED)) | 1538 | if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED| |
1539 | __WNOTHREAD|__WCLONE|__WALL)) | ||
1539 | return -EINVAL; | 1540 | return -EINVAL; |
1540 | if (!(options & (WEXITED|WSTOPPED|WCONTINUED))) | 1541 | if (!(options & (WEXITED|WSTOPPED|WCONTINUED))) |
1541 | return -EINVAL; | 1542 | return -EINVAL; |