Skip to content

Commit 24fb6b8

Browse files
captain5050Ingo Molnar
authored andcommitted
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: John Sperbeck <[email protected]> Fixes: 6eef8a7 ("perf/core: Use min_heap in visit_groups_merge()") Signed-off-by: Ian Rogers <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 33238c5 commit 24fb6b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/events/core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3522,7 +3522,8 @@ static void cpu_ctx_sched_out(struct perf_cpu_context *cpuctx,
35223522

35233523
static bool perf_less_group_idx(const void *l, const void *r)
35243524
{
3525-
const struct perf_event *le = l, *re = r;
3525+
const struct perf_event *le = *(const struct perf_event **)l;
3526+
const struct perf_event *re = *(const struct perf_event **)r;
35263527

35273528
return le->group_index < re->group_index;
35283529
}

0 commit comments

Comments
 (0)