From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934057AbcCOXfK (ORCPT ); Tue, 15 Mar 2016 19:35:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59340 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933970AbcCOXez (ORCPT ); Tue, 15 Mar 2016 19:34:55 -0400 Date: Wed, 16 Mar 2016 00:34:52 +0100 From: Oleg Nesterov To: Andrew Morton Cc: Denys Vlasenko , Dmitry Vyukov , Jan Kratochvil , "Michael Kerrisk (man-pages)" , Pedro Alves , Roland McGrath , syzkaller@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] wait: allow sys_waitid() to accept __WNOTHREAD/__WCLONE/__WALL Message-ID: <20160315233452.GA14523@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160315233427.GA14509@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 15 Mar 2016 23:34:55 +0000 (UTC) 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(). In particular this change can help if we reconsider the previous change which adds the "automagical" __WALL for debugger. Signed-off-by: Oleg Nesterov --- kernel/exit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/exit.c b/kernel/exit.c index c112abb..9db1f4a 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1533,7 +1533,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; -- 2.5.0