Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3864792ybg; Sun, 20 Oct 2019 23:27:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgom+zs/P2EgbBbGrR7vlCibfh91wefzvKcxpcI1Nu+vqEYjWlPYa6Ew1BblZ40xRPfGxx X-Received: by 2002:a50:c90d:: with SMTP id o13mr23060803edh.85.1571639270576; Sun, 20 Oct 2019 23:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571639270; cv=none; d=google.com; s=arc-20160816; b=BV7/2g4Rt9xSAwKIz5V9gjSgxbF+FIho+hM6eD2tZKbPZ/3kUrdKRGaD6Nc2PORxsT Vhms3WiNIp0u1fxev5cyQFFVA76UhMozAGHdS2Ra+h7DLh+K6mEg9CygviwFYFCoR5iy sFaLoK/fmQlW8K5FmB1LDvNjUSuTSpAuWsjD14k62XW6HCYvkMipsiPGOBp2+ouCV7K9 DvMp3KZstON5IverUgAqq43OepNRV+tXpWIY+vkwcUjiunqE6A9hzc8HuJmsip3xxiE0 Zt6mdGLx/BgF8hejbmIlJ+qQs1mzGE23NU4CV4/IjvNvSEpPFZIcy18l3JSw+CDJz3gL wu+Q== 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=t3NqI26fNGCePfh23seTzt7MbB3glxrvuOuKpg9jpHA=; b=XVvqSfhwW2kPcY9vf5HaamxpzvYjIPDONonuGBs6RQdWtXu2vYElSO1Uyv0BVxwqfc W4AZXwl+Wou2x2opiVrkrHjTebW0u3PD8UYJ6REk4yYv2/zd1TQxhRU7NBV2a3NUVA+K 0BBe2664pgIxeH+tvYcdr1tjM5FXvh3gXcMojcMJa/IKkHOA/UCOGY92/glE7JRqRwZ3 GhiqeuQbZv4md5PtJ6I5EGnOznhaQ/vkJbijYYATnNOEbXBZoD380chlLtrxi4vrJ572 XCeaSiP1HS4Z/po6nycvY+bi1/iV7yaRNlAjixl/FuFsvbawWcJqT7BsSsTxiKrwaJTz zbGQ== 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 be13si8525884edb.362.2019.10.20.23.27.27; Sun, 20 Oct 2019 23:27:50 -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 S1727224AbfJUG1A (ORCPT + 99 others); Mon, 21 Oct 2019 02:27:00 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:33231 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727154AbfJUG0z (ORCPT ); Mon, 21 Oct 2019 02:26:55 -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 1iMR9R-00028p-OL; Mon, 21 Oct 2019 08:26:45 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 61F2B1C0092; Mon, 21 Oct 2019 08:26:44 +0200 (CEST) Date: Mon, 21 Oct 2019 06:26:44 -0000 From: "tip-bot2 for Andi Kleen" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/urgent] 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: <157163920413.29376.14343000845352955171.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/urgent branch of tip: Commit-ID: 98a8b2e60c69927b1f405c3b001a1de3f4e53901 Gitweb: https://git.kernel.org/tip/98a8b2e60c69927b1f405c3b001a1de3f4e53901 Author: Andi Kleen AuthorDate: Fri, 11 Oct 2019 11:21:40 -07:00 Committer: Arnaldo Carvalho de Melo CommitterDate: Tue, 15 Oct 2019 11:51:33 -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 d277a98..de79c73 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -1659,7 +1659,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; }