lkml.org 
[lkml]   [2019]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts
On Wed, Mar 13, 2019 at 12:51:25PM -0400, Steven Rostedt wrote:
> On Wed, 13 Mar 2019 08:51:55 -0700
> "Paul E. McKenney" <paulmck@linux.ibm.com> wrote:
>
> > Does this mean that there is a better approach that Joel's suggestion?
> > I believe he would end up with something like this:
> >
> > WARN_ON_ONCE(IS_ENABLED(CONFIG_PROVE_RCU) && !in_irq());
> >
> > It would be nice if there is something like this:
> >
> > lockdep_assert_in_irq_handler();
> >
> > But I haven't seen this. (Not that I have looked particularly hard for
> > such a thing, mind you!)
>
> That would be trivial to implement:
>
> #define lockdep_assert_in_irq() do {
> WARN_ON(debug_locks && !current->hardirq_context);
> } while (0)

Looks good to me!

Joel, does this work for you? I could be wrong, but I suspect that Steve
is suggesting that you incorporate the above into your eventual patch. ;-)

Thanx, Paul

\
 
 \ /
  Last update: 2019-03-13 19:07    [W:0.099 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site