Re: [BUG v6.0-rc2] lockdep splat on ct_kernel_enter()
From: Paul E. McKenney
Date: Mon Aug 22 2022 - 22:36:57 EST
On Mon, Aug 22, 2022 at 10:01:34PM -0400, Steven Rostedt wrote:
> On Mon, 22 Aug 2022 21:40:24 -0400
> Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> > And this patch (which is wrong, but will at least let my tests finish
> > testing my code) makes the warning go away.
>
> Well that patch was against the broken commit, but this patch against
> 6.0-rc2 works for me, albeit, it's still wrong ;-)
It does sort of defeat the original purpose. But maybe it is what is
needed in the near term?
Frederic, thoughts?
Thanx, Paul
> -- Steve
>
> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
> index 77978e372377..17201159f3df 100644
> --- a/kernel/context_tracking.c
> +++ b/kernel/context_tracking.c
> @@ -330,13 +330,13 @@ EXPORT_SYMBOL_GPL(ct_idle_enter);
> * If you add or remove a call to ct_idle_exit(), be sure to test with
> * CONFIG_RCU_EQS_DEBUG=y.
> */
> -void noinstr ct_idle_exit(void)
> +void ct_idle_exit(void)
> {
> unsigned long flags;
>
> - raw_local_irq_save(flags);
> + local_irq_save(flags);
> ct_kernel_enter(false, RCU_DYNTICKS_IDX - CONTEXT_IDLE);
> - raw_local_irq_restore(flags);
> + local_irq_restore(flags);
> }
> EXPORT_SYMBOL_GPL(ct_idle_exit);
>