From patchwork Thu Apr 2 19:13:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228233 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30163C2BA16 for ; Thu, 2 Apr 2020 19:13:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 05A0820719 for ; Thu, 2 Apr 2020 19:13:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="AfRbKwlG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388905AbgDBTNe (ORCPT ); Thu, 2 Apr 2020 15:13:34 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45077 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388989AbgDBTNe (ORCPT ); Thu, 2 Apr 2020 15:13:34 -0400 Received: by mail-wr1-f68.google.com with SMTP id t7so5540168wrw.12 for ; Thu, 02 Apr 2020 12:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=4pengcvy5Yycyp9fs4C3dUV4shvRnbagfJNMDgQf1lc=; b=AfRbKwlGHaSi6+M6Gq8BueNi6Ji6Zwg3q3E1kMdTrG6FOOWy1WSF+Bm0ORbJznbM4b JV3lymnN95eWs7bcENoKcU7MDXTfih8KU6TdShDlnSAKmJ+3LU7RYTlmp0s9y89cjWi9 9Kmz0u0PwIM3DS/K1HDUQNETqlRi//UDq+DItzxRE25nSuV+J7q7y2mtZgADdEkKFC7N 6bTDQeXqL/QUx0jmL1IHjJdziwTmuhhYQ7+wQnDKOsKJ3qh9ECfF8oYnIzbGwyZh6dqg xHC+O2pIgZ/2Y5sYyzJbu9CG5XxbuFR2tbL8cop1+WmRfykPhrIoyNLSt52wulMIRmj+ 3t+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4pengcvy5Yycyp9fs4C3dUV4shvRnbagfJNMDgQf1lc=; b=baHgB/zuTGd/8K9HPMp2X6Fi5Zk20ejh/6BUzL2p+sLgFfJK/+bZc6cClQWR3jFIiz j8KIqPy2NFpjeg5W9GV4wEIqkEjN1LoQL5PqDwFz+3N3HKIEwE/zcR4d75/nHNmeqrvr 5mNUFH1ULPa0LLJL9HYCKHDcQGXoyvw+TFxo7wmjUGqM+fpja17OAm/VbdI/CLhV2vQf NAuJUmRzT/EwZcofKiFVsCJz7Lv6OO2Q93MEh8HuXk666c0n7gCDXO9ahq53CfK+8oyE /Ncq73KQHLfoc4KdKlSfU0bDU7WU2g9UlamHQOrDSO8BoySi7OAwVN3nTo+7mhJaJ82u Y7hQ== X-Gm-Message-State: AGi0PuYeH5+dfYJ1cv/UzmG98FivRvMCXYOzJ7HmsTbll9zi5mdkak+c Jw8WxosOU+/DTFbpO2tBNn7fFYUVmLDvvg== X-Google-Smtp-Source: APiQypIZNWKjRjaayP5ODVJhOEnmn65Q0QN3CAESYgobGot2+5w5qp9uDCD+EOs4DQJ8bcisk4xHrA== X-Received: by 2002:adf:a348:: with SMTP id d8mr4970027wrb.83.1585854812084; Thu, 02 Apr 2020 12:13:32 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id y12sm5511514wrn.55.2020.04.02.12.13.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:13:31 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.14 30/33] perf/core: Reattach a misplaced comment Date: Thu, 2 Apr 2020 20:13:50 +0100 Message-Id: <20200402191353.787836-30-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191353.787836-1-lee.jones@linaro.org> References: <20200402191353.787836-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Alexander Shishkin [ Upstream commit f25d8ba9e1b204b90fbf55970ea6e68955006068 ] A comment is in a wrong place in perf_event_create_kernel_counter(). Fix that. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20191030134731.5437-2-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar Signed-off-by: Lee Jones --- kernel/events/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 2ac73b4cb8a93..9d8f699f11873 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -10430,10 +10430,6 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu, struct perf_event *event; int err; - /* - * Get the target context (task or percpu): - */ - event = perf_event_alloc(attr, cpu, task, NULL, NULL, overflow_handler, context, -1); if (IS_ERR(event)) { @@ -10444,6 +10440,9 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu, /* Mark owner so we could distinguish it from user events. */ event->owner = TASK_TOMBSTONE; + /* + * Get the target context (task or percpu): + */ ctx = find_get_context(event->pmu, task, event); if (IS_ERR(ctx)) { err = PTR_ERR(ctx);