From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69DC1C433F5 for ; Tue, 14 Dec 2021 05:57:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X6+210sxlfSB9EY7lMSlMT2FCC4N+4evmCHnl4jRlxA=; b=PYHuEoI99f7SwH 3eRrdr6C/1hGpb0lZbdX8zGganON1vwDdLBEZgGXZYzkvthFJUZ7MBKC/TAInuCuKFckhYul+gCaP YUuZWRTUZ6oAdDfmuldapjd+XDmdPV+RFjnnjjX2T4rWLO26dop6us1JrMxO2pbgiMsJg7a3a1glh auK7jEn1srNZSk5X/L+7ipRNxLbmADOwGSh2tvy9baMr87dsr83pdpo/hYg9e41isz3zO4cq5dVBV VpKa3HqeCg75cRsAUuwgkbWlejAKeUE0Wbxp6aHAUwAgKU4Z2YJaelsSuDFgWXA/gr4rNxVmfclFP 2Vy1pR8i/DENFy3LxdYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx0nn-00CgIO-P8; Tue, 14 Dec 2021 05:56:39 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx0nk-00CgGk-EA for linux-arm-kernel@lists.infradead.org; Tue, 14 Dec 2021 05:56:37 +0000 Received: by mail-pj1-x1032.google.com with SMTP id gx15-20020a17090b124f00b001a695f3734aso15267245pjb.0 for ; Mon, 13 Dec 2021 21:56:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=NIM7gH+mWve7U4rqetzbz5Hnwl1+TH0EFEyUrpMHQUE=; b=R6W7a6zCSTaqnBmLYrEuhlQJ7Op0kMaP0shkF54FmD3QotmJ75+IjWmVV7g7Pqacom XFWTzljZdpf3hwjfyTwxsXGC+2UjwxGndyQbt9OOnSYiCF8QptVTyKG+EsJrp2AGT5nc eDh+p4pVLEFJlwF5osr5ERjwCnmbpnyp0QxvbKQTpXDDbTpgUdXH1BuaQC2I1KXMKclJ sfgCpuE9Pvnc0x1zNBkgIQNMFdeYJWcfvNcDeUbQGwRfJlXlMr3OgjP0FzIvT+oH4xFB njChqC1ZU0okB4kFd+FXHDLkB4U33FnZAk8gJFJhgY9GuEKjncCe1i4K/oHXqZ6YU9GG NhIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=NIM7gH+mWve7U4rqetzbz5Hnwl1+TH0EFEyUrpMHQUE=; b=CsTs0G8ZdQqHfEb3wJSzUaCbNQbI8nNmIBNy55w4u63Rtu1egMpLz5U2jS8Ynqn3A7 Xij6x862j71qYnDplRuAj1Ix0LqkB+3FwSap+fW3D+Dt79EeMNvYh0D9L9H8UIbBnmpe YYkkb4B/CSBWWAVw5VrosJ7UzMrh0kG2rVBqh0KeAP17pRVLKUoVhSV/kU+9o2qyEJTl 8S5ov34uF0+ZhKnwYU+oada6RFP2x6TIkubWP6mNTd5YL8AQfHJyuARSi8Qmr/HyWw6n V/TAimy0elY6ybOm+7litwk9EUdhInZikNsp7cnNHhsTfX3s/D361m2cB7et/wJ4CTHL 61Lw== X-Gm-Message-State: AOAM530TVtE/4vRvJ/WD900awkUmR5fxbomOlZg2evukzh4eU+/wzJjQ b2zUdrXHGk6tq0bYoPp9xE8t65Kninz4VyXP X-Google-Smtp-Source: ABdhPJwYVpxwaIexwwBOXhDSDOwdU9pcdVcstWKnpGkOkE1KrxXSYkS5/RnE4UyZ+KGNhL2Y6Up6WQ== X-Received: by 2002:a17:90a:e00c:: with SMTP id u12mr3340072pjy.139.1639461395295; Mon, 13 Dec 2021 21:56:35 -0800 (PST) Received: from localhost ([110.141.142.237]) by smtp.gmail.com with ESMTPSA id j6sm13923385pfu.205.2021.12.13.21.56.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 21:56:34 -0800 (PST) Date: Tue, 14 Dec 2021 16:56:31 +1100 From: Balbir Singh To: Leo Yan Cc: "David S. Miller" , Jakub Kicinski , Leon Romanovsky , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Alexander Shishkin , Jan Harkes , coda@cs.cmu.edu, Paul Moore , Eric Paris , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, codalist@coda.cs.cmu.edu, linux-audit@redhat.com Subject: Re: [PATCH v2 7/7] taskstats: Use task_is_in_init_pid_ns() Message-ID: References: <20211208083320.472503-1-leo.yan@linaro.org> <20211208083320.472503-8-leo.yan@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211208083320.472503-8-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_215636_502404_F0430F07 X-CRM114-Status: GOOD ( 16.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 08, 2021 at 04:33:20PM +0800, Leo Yan wrote: > Replace open code with task_is_in_init_pid_ns() for checking root PID > namespace. > > Signed-off-by: Leo Yan > --- > kernel/taskstats.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/taskstats.c b/kernel/taskstats.c > index 2b4898b4752e..f570d8e1f001 100644 > --- a/kernel/taskstats.c > +++ b/kernel/taskstats.c > @@ -284,7 +284,7 @@ static int add_del_listener(pid_t pid, const struct cpumask *mask, int isadd) > if (current_user_ns() != &init_user_ns) > return -EINVAL; > > - if (task_active_pid_ns(current) != &init_pid_ns) > + if (!task_is_in_init_pid_ns(current)) > return -EINVAL; > > if (isadd == REGISTER) { > -- > 2.25.1 > Acked-by: Balbir Singh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel