Re: [PATCH v2] tracing: Make tracepoint lockdep check actually test something
From: Steven Rostedt
Date: Fri Mar 10 2023 - 19:41:00 EST
On Sat, 11 Mar 2023 00:56:53 +0100
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Fri, Mar 10, 2023 at 05:28:56PM -0500, Steven Rostedt wrote:
>
> > @@ -249,9 +248,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
> > TP_ARGS(args), \
> > TP_CONDITION(cond), 0); \
> > if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \
> > - rcu_read_lock_sched_notrace(); \
> > - rcu_dereference_sched(__tracepoint_##name.funcs);\
> > - rcu_read_unlock_sched_notrace(); \
> > + WARN_ON_ONCE(!rcu_is_watching()); \
> > } \
> > } \
> > __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
>
> Yep, that makes heaps more sense. If you so care you can save one more
> line and make the {} go away too.
I thought about that, but I kinda prefer the brackets still.
>
> In any case,
>
> Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Thanks!
-- Steve