diff options
author | Ian Rogers <irogers@google.com> | 2020-03-21 17:43:31 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-04-08 11:33:45 +0200 |
commit | 24fb6b8e7c2280000966e3f2c9c8069a538518eb (patch) | |
tree | 419f6dae268f664b2cd6f651dab15f0fb3a7204e | |
parent | perf/core: Fix event cgroup tracking (diff) | |
download | linux-24fb6b8e7c2280000966e3f2c9c8069a538518eb.tar.xz linux-24fb6b8e7c2280000966e3f2c9c8069a538518eb.zip |
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 <jsperbeck@google.com>
Fixes: 6eef8a7116de ("perf/core: Use min_heap in visit_groups_merge()")
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20200321164331.107337-1-irogers@google.com
-rw-r--r-- | kernel/events/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 7afd0b503406..26de0a5ee887 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -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) { - 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; } |