Commit 24fb6b8e authored by Ian Rogers's avatar Ian Rogers Committed by Ingo Molnar

perf/cgroup: Correct indirection in perf_less_group_idx()

The void* in perf_less_group_idx() is to a member in the array which points
at a perf_event*, as such it is a perf_event**.
Reported-By: default avatarJohn Sperbeck <jsperbeck@google.com>
Fixes: 6eef8a71 ("perf/core: Use min_heap in visit_groups_merge()")
Signed-off-by: default avatarIan Rogers <irogers@google.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20200321164331.107337-1-irogers@google.com
parent 33238c50
...@@ -3522,7 +3522,8 @@ static void cpu_ctx_sched_out(struct perf_cpu_context *cpuctx, ...@@ -3522,7 +3522,8 @@ static void cpu_ctx_sched_out(struct perf_cpu_context *cpuctx,
static bool perf_less_group_idx(const void *l, const void *r) static bool perf_less_group_idx(const void *l, const void *r)
{ {
const struct perf_event *le = l, *re = r; const struct perf_event *le = *(const struct perf_event **)l;
const struct perf_event *re = *(const struct perf_event **)r;
return le->group_index < re->group_index; return le->group_index < re->group_index;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment