lkml.org 
[lkml]   [2011]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:perf/urgent] perf: Fix find_get_context() vs perf_event_exit_task() race
On 01/21, Ingo Molnar wrote:
>
> * tip-bot for Oleg Nesterov <oleg@redhat.com> wrote:
>
> > @@ -6127,7 +6133,7 @@ static void perf_event_exit_task_context(struct task_struct *child, int ctxn)
> > * scheduled, so we are now safe from rescheduling changing
> > * our context.
> > */
> > - child_ctx = child->perf_event_ctxp[ctxn];
> > + child_ctx = rcu_dereference(child->perf_event_ctxp[ctxn]);
> > task_ctx_sched_out(child_ctx, EVENT_ALL);
> >
> > /*
>
> hm, this one's causing:
>
> [ 25.557579] ===================================================
> [ 25.561361] [ INFO: suspicious rcu_dereference_check() usage. ]


Oh, indeed, I am stupid!

I added rcu_dereference() because it has smp_read_barrier_depends(),
but I forgot about rcu_dereference_check().

I'll send the fix soon...

Oleg.



\
 
 \ /
  Last update: 2011-01-21 17:03    [W:0.174 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site