Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp689828yba; Thu, 18 Apr 2019 08:02:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxp7bnd38HjeIpOCHUshcvpKm6+NrBGXtbr0j5jqPgT+vNO8o2OoegDi3RFPhyaO8IcCfAX X-Received: by 2002:a63:79c3:: with SMTP id u186mr86158450pgc.20.1555599754505; Thu, 18 Apr 2019 08:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555599754; cv=none; d=google.com; s=arc-20160816; b=QXaVAJ7nbI+DsvPGquRqbyFMhHCSwWs4Dw0Og28bSvWxl7ufCEYvnJWqC9TQfXflJA QxQRBThYSsnsHaCTW/4ttECoFrA7L+pp0qYhqk0koi5ATVAY/t4m+R8Ooqu6qAysFimW qWXwnJe+IWxKLpl4cgPM6up5tNxpgBe5/eracRumZtRBSoWVrqQQzSGthH801/Tgzwwi QWh+DQVBKJHEqgQHFqaB7kPcKDAzQqTEpYROk7cZkqRjCYKd1hFm0F49pmiqyXYr85vI 74+FTmM21ZzOM9Wjg+fFkmfWSvjf1UwTj9oKxX92iBMTrrDeVysjzYcThY5XdXBK44/7 fUdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature; bh=2Le3h0tZ8piv7ds5Md/NKWcj0xXcsOHpcKJMbbDJ6Dc=; b=tUexY5Xalq64biD/Kapx68SvG7T/HQg60A/UkHZbUeak0jsF4927ORwDOWrJyIT3yI jRdG6o2gI+fdJOGJMrixI0IcsM8CDmgO1dFHgen5lHO3GCkbvlz9A9RbbnY/s4c65Fbv QCa4xbElwOziJAfF2YAdN6fdpT4C3qKRJD8XR5Jm7AOLNR5DI3aTayVSIGBKV2K5Nl63 1JU/3eoUBh7FHrJ9U2OXL/4N8oayyNfSikWjPuS5z5j07Iy3M4hdw3PZClvONyqRFJUJ t4EL4xNqrj1jgwIwlLaI0uoA1iss7EMJYHEKkaPLNgyd32OUwx0aASebbVIp0Tc+Kawh Mqrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@brauner.io header.s=google header.b="Fjc/jM4N"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y71si2002329pgd.51.2019.04.18.08.02.19; Thu, 18 Apr 2019 08:02:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@brauner.io header.s=google header.b="Fjc/jM4N"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389141AbfDRPBP (ORCPT + 99 others); Thu, 18 Apr 2019 11:01:15 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:42482 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388548AbfDRPBP (ORCPT ); Thu, 18 Apr 2019 11:01:15 -0400 Received: by mail-ot1-f68.google.com with SMTP id 103so1941809otd.9 for ; Thu, 18 Apr 2019 08:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:cc:from:message-id; bh=2Le3h0tZ8piv7ds5Md/NKWcj0xXcsOHpcKJMbbDJ6Dc=; b=Fjc/jM4NUogy2nD1DbKe9yeVNzDE9ZMp6ObtNwWd21VZP06CI1tl/ZCgNUQEQPgwal N61EcyhyhJT0P8dy13vnKWg6uiJQRybVwGG41eDN+nmQSoECOSYFqSUfhbGL8fVidn+b awyAMmHrpVhRPWe0LScK/Te8OZg5BGxYdA892DLnxpNOIj7t0dibn6aixKWCSf41YEh/ zIm5B4OGO288MiVkiXQSNpwejh2H6k6XP1DCugVcLaLkmEqWEFQOrtDCtNb6LM1bUrW/ 7lgHpDY3ED3GgghLPB1cOcWzUQj+o6xE3s2UOOu7V6T4xIq4BPtN7MS50dS92T3LyvXY FevA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:cc:from :message-id; bh=2Le3h0tZ8piv7ds5Md/NKWcj0xXcsOHpcKJMbbDJ6Dc=; b=H2yuYybsx+dzuWh48KDuKA2dyYKCz7DQlN3Tsk9SHloIJL8fkxYTrpn3fJH4DhUJ5S g6utci26ht+e5MfMvshOhKUXTNjiLMYBQK4ShS67O5/nXiga2qnDfNpLaOSZSwU2GzhT DOWSmlJV+PuZ/on0srlxYKILASwT6MM3jQ0ASW/biq3vvCu6xhqXx9fLbZDXEyGpZ9Lk US5pCMUWJRLeCHaiUlTtio+icLQQfJjqn3YrRCoezivNulkLI49R9n720NZLKTD6FXgY 8SxKaTgPhzM+Y/Yby3bhV/QZ3c28fneD0PzH7S18NNc1a6cTU/az2WukNM55CwV87JHO p/MQ== X-Gm-Message-State: APjAAAUSeKIgTB9flqVlaV4tVDG71Z0RL0ipAvtSnsXvZtcWA/sMTLg5 DnJTm5LfvrvFJ1NMgq0eL04t3i9Xi4ExQA== X-Received: by 2002:a9d:5f02:: with SMTP id f2mr61126046oti.271.1555599673297; Thu, 18 Apr 2019 08:01:13 -0700 (PDT) Received: from [26.82.237.254] ([172.56.7.76]) by smtp.gmail.com with ESMTPSA id c145sm1011912oig.0.2019.04.18.08.01.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 08:01:12 -0700 (PDT) Date: Thu, 18 Apr 2019 17:01:00 +0200 User-Agent: K-9 Mail for Android In-Reply-To: <20190418142559.GA30069@redhat.com> References: <20190418101841.4476-1-christian@brauner.io> <20190418101841.4476-5-christian@brauner.io> <20190418142559.GA30069@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v2 4/5] signal: support CLONE_PIDFD with pidfd_send_signal To: Oleg Nesterov CC: torvalds@linux-foundation.org, viro@zeniv.linux.org.uk, jannh@google.com, dhowells@redhat.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, serge@hallyn.com, luto@kernel.org, arnd@arndb.de, ebiederm@xmission.com, keescook@chromium.org, tglx@linutronix.de, mtk.manpages@gmail.com, akpm@linux-foundation.org, cyphar@cyphar.com, joel@joelfernandes.org, dancol@google.com From: Christian Brauner Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On April 18, 2019 4:26:00 PM GMT+02:00, Oleg Nesterov w= rote: >On 04/18, Christian Brauner wrote: >> >> +static struct pid *pidfd_to_pid(const struct file *file) >> +{ >> + if (file->f_op =3D=3D &pidfd_fops) >> + return file->private_data; >> + >> + return tgid_pidfd_to_pid(file); >> +} > >the patch looks obviously fine to me, but I have an absolutely >off-topic >question=2E=2E=2E why tgid_pidfd_to_pid() has to check d_is_dir() ? It doesn't have too; pure paranoia=2E Christian