Re: [PATCH v2] tracing: Make tracepoint lockdep check actually test something

From: Peter Zijlstra
Date: Fri Mar 10 2023 - 18:57:19 EST


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.

In any case,

Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>