Message ID | 20220204135051.60639-6-leo.yan@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 9CB3CC433EF for <linux-arm-kernel@archiver.kernel.org>; Fri, 4 Feb 2022 13:53:35 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=h0ElYqk4Mpk1M2g2ylhMHxwj6t+OemnNtCEGW21OcVI=; b=uNz4WJTCWiTVm8 VC28WvJjF/ZKZfZEnZ00eHU4l7+IHpdsuXq2I/DWphivWWFaC6KDT+rxgJ1RngFyFSv1FInKSW/Cv SIjiwhwv9kHCdVIPVLlaIe0o7C9lYUNpV0A5sNLsKuNX8yBJEe2qPqMLmapnx5LRVVN4aL09n9aIW 3w5qeE0PIaSc+nbFT0Ivgs2ShiGoF1br66ycm+HjSXTTFPz+O42waU2XVKJojt5kCMDfgpS5o/K2T krUIcQJhim3L9Sma0v1tSeDDu/FHFKqwUMEWYdQVp7CrNX+rmWT/Jyqu69eW7NWRU3Yr2Uw3vVas9 PRD7sIp1AQAw2iwSa7Zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFz0h-004Rvl-GN; Fri, 04 Feb 2022 13:52:23 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFyzu-004RdC-Vw for linux-arm-kernel@lists.infradead.org; Fri, 04 Feb 2022 13:51:36 +0000 Received: by mail-pf1-x432.google.com with SMTP id n32so5142087pfv.11 for <linux-arm-kernel@lists.infradead.org>; Fri, 04 Feb 2022 05:51:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Jv+1OmXtq7K+DesUXAvsMwR+pbzMT8EaUquwRsw8P1w=; b=k1VUyxVms4sQJMDeZ2D5pmurOg1fSQ8xquL1QIhyqL8rIZizg8PasccYo1eWWzKDzi y8LTWj3d/DbmgV5lF9Xg6DtTq4BStjnhB/5dvVXrC2SBrkxEfvrqMyxdA+z1NkmBG+at 0F37rzV+FxleMELbtw45SKDKQyFgK8NT9kmB5lbEyGkP7HqLaLJb0hINRIZnimovmBlB H0srfNL9Q1+MQOxqZCOK4O6T/UcF9o2SP4va27CLyyWsalzm6E2xTYKSvYiDzIeOYpSL a0nw3lQJNehoOWPikNvb7gaIVcX8uxqCO4xLKCt+GyNhBr0LRvR8DZ4alQxV4nFYFPQp R1+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Jv+1OmXtq7K+DesUXAvsMwR+pbzMT8EaUquwRsw8P1w=; b=Ta7SGN4lLhwePaHUUk3r/jzEVw53IIGuzVtvLLPzG+Wgphgzmmfs4HUUouS3Mdj8w0 1lw08rE+rLox2qaFuBarZrbgwT7fwVtUFOvooyXIyzEZAf8cYwK6IMOlv6iBc0ZRLyXH x1Z6KI2NFks3WHVp0YjAE0RFcj4ZSmt+w9LLBATfvYctXb9mGu+O5jIZQSuu8tgfUbFU pLP0g/QXWc6bR+txuPGroaLA9BabNTT/coHCwzQQQJQLKY3VlRnYjRGNhcR2LW9Q6Fcf oOEH5Qdnw6Q4PHqxk0Er9CeNut49fZsyLlcaZ3u0XjSdsRPlRXMeSTh7qIyUSPQGTw1Q eY+g== X-Gm-Message-State: AOAM531GljyUPSxtCdDHpSAciUU6PpJa0Jlyw6t+3hpvYfRjQHZYhLMS 4OsPsePacvNVD9e9oxOrcLud3A== X-Google-Smtp-Source: ABdhPJx/XYFD3O/Lx16uh03/xIMBlys471qWZKbIAGTGwKweGLijHoTj4ObsGkqbSS/36TwwZ4ZMAQ== X-Received: by 2002:a63:3285:: with SMTP id y127mr2457121pgy.32.1643982693736; Fri, 04 Feb 2022 05:51:33 -0800 (PST) Received: from localhost.localdomain ([134.195.101.46]) by smtp.gmail.com with ESMTPSA id 13sm2668131pfm.161.2022.02.04.05.51.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Feb 2022 05:51:33 -0800 (PST) From: Leo Yan <leo.yan@linaro.org> To: Mathieu Poirier <mathieu.poirier@linaro.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, Mike Leach <mike.leach@linaro.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jan Harkes <jaharkes@cs.cmu.edu>, coda@cs.cmu.edu, Paul Moore <paul@paul-moore.com>, Eric Paris <eparis@redhat.com>, Balbir Singh <bsingharora@gmail.com>, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, codalist@coda.cs.cmu.edu, linux-audit@redhat.com Cc: Leo Yan <leo.yan@linaro.org> Subject: [PATCH v4 5/5] taskstats: Use task_is_in_init_pid_ns() Date: Fri, 4 Feb 2022 21:50:51 +0800 Message-Id: <20220204135051.60639-6-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220204135051.60639-1-leo.yan@linaro.org> References: <20220204135051.60639-1-leo.yan@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220204_055135_048805_E7847BDC X-CRM114-Status: GOOD ( 11.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series | pid: Use helper task_is_in_root_ns() | expand |
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) {