perf fix
Linus,
Please pull the latest perf-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-for-linus
HEAD: c79aa0d96548aee50570209eb2d45c8f4ac49230 events: Protect access via task_subsys_state_check()
This fix adds missing RCU read protection.
Thanks,
Ingo
------------------>
Paul E. McKenney (1):
events: Protect access via task_subsys_state_check()
kernel/events/core.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/events/core.c +2 -0
@@ -4596,6 +4596,7 @@ void perf_event_comm(struct task_struct *task)struct perf_event_context *ctx;int ctxn; +rcu_read_lock ();for_each_task_context_nr (ctxn) { ctx = task->perf_event_ctxp[ctxn];if (!ctx)
@@ -4603,6 +4604,7 @@ void perf_event_comm(struct task_struct *task)perf_event_enable_on_exec (ctx); } +rcu_read_unlock ();if (!atomic_read (&nr_comm_events))return ;