Re: [BUG v6.0-rc2] lockdep splat on ct_kernel_enter()
From: Steven Rostedt
Date: Mon Aug 22 2022 - 21:40:34 EST
On Mon, 22 Aug 2022 20:48:25 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> On Mon, 22 Aug 2022 18:38:36 -0400
> Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> > > The warning happens with the commit, and does not for the commit just
> > > before it is applied.
> > >
> >
> > Nevermind, I tested the wrong kernel (the grub reboot failed to boot to the
> > new kernel). But it did give me a different lockdep splat when I tested the
> > right kernel :-/
> >
> > I'll investigate some more.
>
> I was close. It was this commit:
>
> ed4ae5eff4b3 ("rcu: Apply noinstr to rcu_idle_enter() and rcu_idle_exit()")
>
> that causes the new error message.
>
And this patch (which is wrong, but will at least let my tests finish
testing my code) makes the warning go away.
-- Steve
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 9a5edab5558c..14147d31e651 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -896,13 +896,13 @@ static void noinstr rcu_eqs_exit(bool user)
* If you add or remove a call to rcu_idle_exit(), be sure to test with
* CONFIG_RCU_EQS_DEBUG=y.
*/
-void noinstr rcu_idle_exit(void)
+void rcu_idle_exit(void)
{
unsigned long flags;
- raw_local_irq_save(flags);
+ local_irq_save(flags);
rcu_eqs_exit(false);
- raw_local_irq_restore(flags);
+ local_irq_restore(flags);
}
EXPORT_SYMBOL_GPL(rcu_idle_exit);