Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4918946ybg; Mon, 21 Oct 2019 17:04:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUdYYAG5b5jCblTN1P5QwVeSQx3l1BrqwvhD1zbPSZw0mRIGA/aUyIRWWf+j84fLAfUYA1 X-Received: by 2002:a50:9269:: with SMTP id j38mr9932030eda.5.1571702687345; Mon, 21 Oct 2019 17:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571702687; cv=none; d=google.com; s=arc-20160816; b=R92XLNLiGRXr3TMy88Zv9w+5V05H+GCDuu4B8EosWRGOJN2xPG89S+B7dFBbTgZbTK MG6kvhNAJw+yRyXsPk7q2NlSIlpLYeGEUGk7qntle26Wo7suKP6Jw99A9tpKJsU4/tJf hTwc0KPxkJiomfJjOTz73HJDdJcS/5ZrZjhkFZD1KyVmbACpEKF4c0+8oixVxrzpfBfo OjzSSt2srTh563ShB3KRfybSBcoFl21YumrZjF6+fm5VZZBMIo5QDc6JMGbROk4ZvXWv GvyXojYrDmZ9dDlkFWj/xlVvQ4o68S5sqLLyYzKgIjlntA4m8S1/9tGltdg5RVD/21TE UIHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=N0fed3Kili2bC69i4eXbYvkwQHDzLf3l2Vfi631UDeE=; b=KEJHM7YkZsYgL8kU+nocFoDJtDEYB/+NqD9rFN4Z2Epr0+LY1QMqWr9AOeGiv7U0B9 6GubmPa3g1ab4h2XxzSJ49ApjQPP7iZiZ6kf0rEYUHOjqRKaWCfyMO3/SdeoAgzGyn6q LoALRUNlb2M8mp3uC3Il6pgnGXE8y9GyFvGcTUkMOf7F8OVxMPPC+MarcqCDpMgekT7g QD0TtywyCYW/dVaqbRk/UyoSadVq5xp1iFRW7SaUgWjZc/MW3fxMTb1odITB1bIFUOui KLmoRnfw+mRc4QDkwOaXpM3JSO8RyFb8xKaY8LCdWoGlPDDQ367eoScqrH5+Qbm/wrqU HB4A== ARC-Authentication-Results: i=1; mx.google.com; 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 o14si9711055ejc.405.2019.10.21.17.04.22; Mon, 21 Oct 2019 17:04:47 -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; 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 S1730662AbfJVAD4 (ORCPT + 99 others); Mon, 21 Oct 2019 20:03:56 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:38895 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730620AbfJVADy (ORCPT ); Mon, 21 Oct 2019 20:03:54 -0400 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iMgxU-0004Hi-4l; Tue, 22 Oct 2019 01:19:28 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 3252C1C04E3; Tue, 22 Oct 2019 01:19:20 +0200 (CEST) Date: Mon, 21 Oct 2019 23:19:19 -0000 From: "tip-bot2 for Andi Kleen" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf evlist: Fix fix for freed id arrays Cc: Andi Kleen , Jiri Olsa , Arnaldo Carvalho de Melo , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <20191011182140.8353-2-andi@firstfloor.org> References: <20191011182140.8353-2-andi@firstfloor.org> MIME-Version: 1.0 Message-ID: <157169995980.29376.12960960296127455918.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: 5a40e1994815ab09c59614c6a13d94eef55d1a7f Gitweb: https://git.kernel.org/tip/5a40e1994815ab09c59614c6a13d94eef55d1a7f Author: Andi Kleen AuthorDate: Fri, 11 Oct 2019 11:21:40 -07:00 Committer: Arnaldo Carvalho de Melo CommitterDate: Tue, 15 Oct 2019 08:36:22 -03:00 perf evlist: Fix fix for freed id arrays In the earlier fix for the memory overrun of id arrays I managed to typo the wrong event in the fix. Of course we need to close the current event in the loop, not the original failing event. The same test case as in the original patch still passes. Fixes: 7834fa948beb ("perf evlist: Fix access of freed id arrays") Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191011182140.8353-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/evlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 21b77ef..8793b4e 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -1599,7 +1599,7 @@ struct evsel *perf_evlist__reset_weak_group(struct evlist *evsel_list, is_open = false; if (c2->leader == leader) { if (is_open) - perf_evsel__close(&evsel->core); + perf_evsel__close(&c2->core); c2->leader = c2; c2->core.nr_members = 0; }