Re: perf: aux area related crash and warnings

From: Peter Zijlstra
Date: Thu Jun 18 2015 - 06:24:30 EST


On Thu, Jun 18, 2015 at 12:35:31PM +0300, Alexander Shishkin wrote:
> Ingo Molnar <mingo@xxxxxxxxxx> writes:
>
> > * Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx> wrote:
> >
> >> +void rb_free_aux(struct ring_buffer *rb)
> >> +{
> >> + /*
> >> + * hold rb::refcount to make sure rb doesn't disappear
> >> + * before aux pages are freed
> >> + */
> >> + if (WARN_ON_ONCE(!atomic_inc_not_zero(&rb->refcount)))
> >> + return;
> >> +
> >> + if (atomic_dec_and_test(&rb->aux_refcount))
> >> + call_rcu(&rb->rcu_head, rb_free_rcu);
> >> + else
> >> + ring_buffer_put(rb); /* matches the increment above */
> >
> > Is call_rcu() NMI-safe? I don't think so ...
>
> Actually, we couldn't establish that without Paul's help.

I was fairly sure it was not, Paul did confirm last night it is indeed
not.
--
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/