perf: Fix up delayed_put_task_struct()
I missed a perf_event_ctxp user when converting it to an array. Pull this last user into perf_event.c as well and fix it up. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
这个提交包含在:
@@ -149,9 +149,7 @@ static void delayed_put_task_struct(struct rcu_head *rhp)
|
||||
{
|
||||
struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
|
||||
|
||||
#ifdef CONFIG_PERF_EVENTS
|
||||
WARN_ON_ONCE(tsk->perf_event_ctxp);
|
||||
#endif
|
||||
perf_event_delayed_put(tsk);
|
||||
trace_sched_process_free(tsk);
|
||||
put_task_struct(tsk);
|
||||
}
|
||||
|
@@ -5893,6 +5893,14 @@ again:
|
||||
}
|
||||
}
|
||||
|
||||
void perf_event_delayed_put(struct task_struct *task)
|
||||
{
|
||||
int ctxn;
|
||||
|
||||
for_each_task_context_nr(ctxn)
|
||||
WARN_ON_ONCE(task->perf_event_ctxp[ctxn]);
|
||||
}
|
||||
|
||||
/*
|
||||
* inherit a event from parent task to child task:
|
||||
*/
|
||||
|
在新工单中引用
屏蔽一个用户