android_kernel_motorola_sm6375/kernel/events
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Song Liu a2ed7b29d0 perf: Fix list corruption in perf_cgroup_switch()
commit 5f4e5ce638e6a490b976ade4a40017b40abb2da0 upstream.

There's list corruption on cgrp_cpuctx_list. This happens on the
following path:

  perf_cgroup_switch: list_for_each_entry(cgrp_cpuctx_list)
      cpu_ctx_sched_in
         ctx_sched_in
            ctx_pinned_sched_in
              merge_sched_in
                  perf_cgroup_event_disable: remove the event from the list

Use list_for_each_entry_safe() to allow removing an entry during
iteration.

Fixes: 058fe1c044 ("perf/core: Make cgroup switch visit only cpuctxs with cgroup events")
Signed-off-by: Song Liu <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-02-16 12:52:53 +01:00
..
callchain.c
core.c perf: Fix list corruption in perf_cgroup_switch() 2022-02-16 12:52:53 +01:00
hw_breakpoint.c
internal.h perf: Fix get_recursion_context() 2020-11-18 19:20:28 +01:00
Makefile
ring_buffer.c
uprobes.c uprobes: __replace_page() avoid BUG in munlock_vma_page() 2020-08-26 10:40:51 +02:00