diff options
author | Song Liu <songliubraving@fb.com> | 2020-01-22 11:50:27 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-01-28 21:20:19 +0100 |
commit | 07c5972951f088094776038006a0592a46d14bbc (patch) | |
tree | 520cbc9d27be3122880b5ddc43226e1350a08eec /net/Kconfig | |
parent | 003461559ef7a9bd0239bae35a22ad8924d6e9ad (diff) | |
download | linux-07c5972951f088094776038006a0592a46d14bbc.tar.bz2 |
perf/cgroups: Install cgroup events to correct cpuctx
cgroup events are always installed in the cpuctx. However, when it is not
installed via IPI, list_update_cgroup_event() adds it to cpuctx of current
CPU, which triggers list corruption:
[] list_add double add: new=ffff888ff7cf0db0, prev=ffff888ff7ce82f0, next=ffff888ff7cf0db0.
To reproduce this, we can simply run:
# perf stat -e cs -a &
# perf stat -e cs -G anycgroup
Fix this by installing it to cpuctx that contains event->ctx, and the
proper cgrp_cpuctx_list.
Fixes: db0503e4f675 ("perf/core: Optimize perf_install_in_event()")
Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20200122195027.2112449-1-songliubraving@fb.com
Diffstat (limited to 'net/Kconfig')
0 files changed, 0 insertions, 0 deletions