lkml.org 
[lkml]   [2015]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: perf: aux area related crash and warnings
On Thu, Jun 18, 2015 at 11:09:55AM +0200, Ingo Molnar wrote:
>
> * Alexander Shishkin <alexander.shishkin@linux.intel.com> 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 ...

Definitely not! ;-)

> I think the life time rules of this object are really messed up if they can be
> freed from any fast path. How come the freeing can happen in NMI context?
> Shouldn't the hardware first stop, then we can free things from the system call
> path, or so?
>
> Thanks,
>
> Ingo
>



\
 
 \ /
  Last update: 2015-06-18 19:01    [W:5.075 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site