Re: Q: perf_install_in_context/perf_event_enable are racy?

From: Peter Zijlstra
Date: Mon Jan 31 2011 - 14:28:26 EST


On Mon, 2011-01-31 at 20:11 +0100, Oleg Nesterov wrote:
>
> > > > raw_spin_lock(&ctx->lock);
> > > > - ctx->is_active = 1;
> > > > + WARN_ON_ONCE(!ctx->is_active);
> > >
> > > This looks wrong if ctx->task == NULL.
> >
> > cpuctx->ctx should still have ->is_active = 1 I think.
>
> Unless this is the first cpu counter, no?

Ah, indeed..

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/