[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8A437322-D16E-4D5F-ACFA-3B1DEAAC100A@brauner.io>
Date: Fri, 26 Jul 2019 23:30:52 +0200
From: Christian Brauner <christian@...uner.io>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
Oleg Nesterov <oleg@...hat.com>, Arnd Bergmann <arnd@...db.de>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Kees Cook <keescook@...omium.org>,
Joel Fernandes <joel@...lfernandes.org>,
Thomas Gleixner <tglx@...utronix.de>,
Tejun Heo <tj@...nel.org>, David Howells <dhowells@...hat.com>,
Jann Horn <jannh@...gle.com>,
Andrew Lutomirski <luto@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Aleksa Sarai <cyphar@...har.com>,
Al Viro <viro@...iv.linux.org.uk>,
Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [PATCH v1 1/2] pidfd: add P_PIDFD to waitid()
On July 26, 2019 11:26:45 PM GMT+02:00, Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>On Fri, Jul 26, 2019 at 2:41 AM Christian Brauner
><christian@...uner.io> wrote:
>>
>> - if (type < PIDTYPE_MAX)
>> + if (type < PIDTYPE_MAX && !pid)
>> pid = find_get_pid(upid);
>
>So now we have four cases in the switch statement, and two of them do
>*not* want that "find_get_pid()" call.
>
>Honestly, let's just move that whole thing into the switch statement
>for the two cases that do want it. Particulartly since I think the
>"upid == 0" case for P_PGID will prefer it that way anyway.
>
>Let's not check 'type' in two different places in two completely
>different ways.
>
>Ok?
>
> Linus
Ok, will resend with that changed.
Christian
Powered by blists - more mailing lists