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 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 D311AC2D0E8 for ; Fri, 3 Apr 2020 12:18:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A680E20737 for ; Fri, 3 Apr 2020 12:18:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="veyEAL64" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403927AbgDCMSj (ORCPT ); Fri, 3 Apr 2020 08:18:39 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:37331 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403845AbgDCMSj (ORCPT ); Fri, 3 Apr 2020 08:18:39 -0400 Received: by mail-wm1-f65.google.com with SMTP id j19so7458710wmi.2 for ; Fri, 03 Apr 2020 05:18:36 -0700 (PDT) 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=bQSVQUznH72WQBKL04U2uoQruvsVD6tJ6h7LJtSHrIo=; b=veyEAL64v91MslbK3AzClUmpLp/IS7ZozZ7HttjdXClrfNCOQ+KPVn1qLN+uoPBXYZ RSoGJKiVkecLcr5XA41lWf9ee+V9X6mzGeGa4IV7od252JuaRa347p7XquxlOjRTKGRM Z5VKnJssWBT/3IrsPddG+0fOuEBXerSUxfq01ktfoDg9Fy2tuJmKEJjkWuT2kmW5Wr2A YCWiySyUxCZ+HUfD77utoYsElyD/KdVbCAxHlMWx4vKv9vMAcU9/3KejwFlXy4b+Xm8Y Hwj8LxVhW8uhUNFhlcxKGf0g4EQR7jGSvqBkbR4PTaAgLuogFdTjqV3R7FW17FCn8vMI xhrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bQSVQUznH72WQBKL04U2uoQruvsVD6tJ6h7LJtSHrIo=; b=FREEIBNl/GlWjyzbSFIaUZm8t78C8ZVTCOnm1x9zd2IObY+DSWTmUAIO2F5Spxxya3 TLUMXN8hd5Z3YDBZwtRkSgA+ArDF0s6iVKHPiyRUit3x/Aty20wA7ImnH4Qi1izJ9LUn NlyWMoW98EQoyY3MgSc1OkY7x7FS7fUZSPsBk03fUA+nEnjsPjQ60MEZxiHDN8BC/cy8 k8DC7sdmIDVBGaPfFVGvGHuMokgrUt97EUwjgc9EZqv/48LG1JMg+EWYSiPmg39RtP3v Lc8eilO/CEYGivnI0gmCdi92ukMuDsbANHMEb0QrqKllWTvRRfPz/JEhzzNGvewLp9QL vIjA== X-Gm-Message-State: AGi0PubgRgxIrdZdn8g1ZjScFzm39Py2bDwBFTR6i+Oam2omgPmNjGyI IuEg9ATIVIGcB6dVS5PcMWWUYYsE2Os= X-Google-Smtp-Source: APiQypJRlcCY8V+WXHTfo+nsBY2mr74pmMDeBm0twCW/WbyEFSLdXZPCyPIKdDrtQC2DdKZzBbLH5Q== X-Received: by 2002:a1c:9ecb:: with SMTP id h194mr8858496wme.49.1585916315934; Fri, 03 Apr 2020 05:18:35 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.179]) by smtp.gmail.com with ESMTPSA id l185sm11377712wml.44.2020.04.03.05.18.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 05:18:35 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Cc: Alexander Shishkin , Peter Zijlstra , Arnaldo Carvalho de Melo , David Ahern , Jiri Olsa , Linus Torvalds , Mark Rutland , Namhyung Kim , Stephane Eranian , Thomas Gleixner , Vince Weaver , Ingo Molnar , Lee Jones Subject: [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment Date: Fri, 3 Apr 2020 13:18:57 +0100 Message-Id: <20200403121859.901838-12-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200403121859.901838-1-lee.jones@linaro.org> References: <20200403121859.901838-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 8c70ee23fbe91..16f268475e8e4 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -10954,10 +10954,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)) { @@ -10968,6 +10964,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); -- 2.25.1