From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752875AbbJTRVp (ORCPT ); Tue, 20 Oct 2015 13:21:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34042 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751590AbbJTRVd (ORCPT ); Tue, 20 Oct 2015 13:21:33 -0400 Date: Tue, 20 Oct 2015 19:17:59 +0200 From: Oleg Nesterov To: Andrew Morton , Dmitry Vyukov Cc: Alexander Potapenko , Denys Vlasenko , Eric Dumazet , Jan Kratochvil , Julien Tinnes , Kees Cook , Kostya Serebryany , Linus Torvalds , "Michael Kerrisk (man-pages)" , Pedro Alves , Robert Swiecki , Roland McGrath , syzkaller@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] wait: allow sys_waitid() to use __WNOTHREAD/__WCLONE/__WALL Message-ID: <20151020171759.GA29311@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151020171740.GA29290@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I see no reason why waitid() can't support other linux-specific flags allowed in sys_wait4(). Signed-off-by: Oleg Nesterov --- kernel/exit.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kernel/exit.c b/kernel/exit.c index 819f51e..c090738 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1532,7 +1532,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; -- 1.5.5.1