Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030868AbdD1Lrt (ORCPT ); Fri, 28 Apr 2017 07:47:49 -0400 Received: from foss.arm.com ([217.140.101.70]:47802 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755241AbdD1Lrm (ORCPT ); Fri, 28 Apr 2017 07:47:42 -0400 From: Mark Rutland To: linux-kernel@vger.kernel.org Cc: acme@kernel.org, alexander.shishkin@linux.intel.com, ganapatrao.kulkarni@cavium.com, mark.rutland@arm.com Subject: [PATCH 0/2] perf stat: fix segfault when closing events Date: Fri, 28 Apr 2017 12:47:08 +0100 Message-Id: <1493380030-4683-1-git-send-email-mark.rutland@arm.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 570 Lines: 21 Hi, These patches fix a segfault seen in some cases when perf stat is exiting. We don't balance opening/closing of events in all cases, and go out-of-bounds when we close events. Full details in the patch 2 commit message. Thanks, Mark. Mark Rutland (2): perf evsel: add per{cpu,thread} close helpers perf stat: balance opening/closing of events tools/perf/builtin-stat.c | 24 +++++++++++++++++++++++- tools/perf/util/evsel.c | 26 ++++++++++++++++++++------ tools/perf/util/evsel.h | 4 ++++ 3 files changed, 47 insertions(+), 7 deletions(-) -- 1.9.1