From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934046AbdJRMHV (ORCPT ); Wed, 18 Oct 2017 08:07:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:49304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932333AbdJRMHU (ORCPT ); Wed, 18 Oct 2017 08:07:20 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F26A21879 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Wed, 18 Oct 2017 09:07:16 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Jin Yao , jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com Subject: Re: [PATCH] perf util: Fix wrong processing when closing evsel fd Message-ID: <20171018120716.GC3707@kernel.org> References: <1508339478-26674-1-git-send-email-yao.jin@linux.intel.com> <20171018081251.GA16747@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171018081251.GA16747@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Oct 18, 2017 at 10:12:51AM +0200, Jiri Olsa escreveu: > On Wed, Oct 18, 2017 at 11:11:18PM +0800, Jin Yao wrote: > > SNIP > > > This change is introduced by "475fb533fb7d" > > ("perf evsel: Fix buffer overflow while freeing events") > > > > This fix is to let xyarray__max_x() return max_x (ncpus) and > > let xyarry__max_y() return max_y (nthreads) > > > > Signed-off-by: Jin Yao > > --- > > tools/perf/util/xyarray.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/tools/perf/util/xyarray.h b/tools/perf/util/xyarray.h > > index 4ba726c..54af6046 100644 > > --- a/tools/perf/util/xyarray.h > > +++ b/tools/perf/util/xyarray.h > > @@ -23,12 +23,12 @@ static inline void *xyarray__entry(struct xyarray *xy, int x, int y) > > > > static inline int xyarray__max_y(struct xyarray *xy) > > { > > - return xy->max_x; > > + return xy->max_y; > > } > > > > static inline int xyarray__max_x(struct xyarray *xy) > > { > > - return xy->max_y; > > + return xy->max_x; > > } > > oops, thanks! > > Acked-by: Jiri Olsa Thanks, applied, I should've caught this, ouch. - Arnaldo