On Fri, Apr 27, 2018 at 9:13 AM, Steven Rostedt <rost...@goodmis.org> wrote: > On Fri, 27 Apr 2018 08:57:01 -0700 > "Paul E. McKenney" <paul...@linux.vnet.ibm.com> wrote: > >> > + if (preempt_on) { \ >> > + WARN_ON_ONCE(in_nmi()); /* no srcu from nmi */ \ >> >> Very good on this check, thank you! > > I think you need to return and not call the read lock. > > if (WARN_ON_ONCE(in_nmi())) > return;
Cool, I'll do that. >> >> > + idx = srcu_read_lock(&tracepoint_srcu); \ >> >> Hmmm... Do I need to create a _notrace variant of srcu_read_lock() >> and srcu_read_unlock()? > > I think so. Oh yes, since otherwise we call into lockdep. Paul, then I think that's true we'd need srcu _notrace variants that don't do the rcu_lock_acquire. Sorry for my earlier email saying its not needed. Thanks, - Joel