lkml.org 
[lkml]   [2023]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] tracing: Make tracepoint lockdep check actually test something
On Sat, 11 Mar 2023 00:56:53 +0100
Peter Zijlstra <peterz@infradead.org> 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@infradead.org>

Thanks!

-- Steve

\
 
 \ /
  Last update: 2023-03-27 00:54    [W:1.933 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site