Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'perf_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fix from Borislav Petkov:
"Prevent cgroup event list corruption when switching events"

* tag 'perf_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf: Fix list corruption in perf_cgroup_switch()

+2 -2
+2 -2
kernel/events/core.c
··· 839 839 */ 840 840 static void perf_cgroup_switch(struct task_struct *task, int mode) 841 841 { 842 - struct perf_cpu_context *cpuctx; 842 + struct perf_cpu_context *cpuctx, *tmp; 843 843 struct list_head *list; 844 844 unsigned long flags; 845 845 ··· 850 850 local_irq_save(flags); 851 851 852 852 list = this_cpu_ptr(&cgrp_cpuctx_list); 853 - list_for_each_entry(cpuctx, list, cgrp_cpuctx_entry) { 853 + list_for_each_entry_safe(cpuctx, tmp, list, cgrp_cpuctx_entry) { 854 854 WARN_ON_ONCE(cpuctx->ctx.nr_cgroups == 0); 855 855 856 856 perf_ctx_lock(cpuctx, cpuctx->task_ctx);