lkml.org 
[lkml]   [2017]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf util: Fix wrong processing when closing evsel fd
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 <yao.jin@linux.intel.com>
> ---
> 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 <jolsa@kernel.org>

jirka

\
 
 \ /
  Last update: 2017-10-22 17:10    [W:0.049 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site