[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-L2Km8nHE7Eevis@boqun-archlinux>
Date: Tue, 25 Mar 2025 11:30:02 -0700
From: Boqun Feng <boqun.feng@...il.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Clark Williams <clrkwllms@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Jens Axboe <axboe@...nel.dk>, Ryo Takakura <ryotkkr98@...il.com>,
NeilBrown <neilb@...e.de>,
Caleb Sander Mateos <csander@...estorage.com>,
Zqiang <qiang.zhang1211@...il.com>,
K Prateek Nayak <kprateek.nayak@....com>,
Borislav Petkov <bp@...en8.de>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>, linux-kernel@...r.kernel.org,
linux-rt-devel@...ts.linux.dev
Subject: Re: [PATCH v4] lockdep: Fix wait context check on softirq for
PREEMPT_RT
On Tue, Mar 25, 2025 at 10:42:36AM +0100, Ingo Molnar wrote:
>
> * Boqun Feng <boqun.feng@...il.com> wrote:
>
> > Since commit 0c1d7a2c2d32 ("lockdep: Remove softirq accounting on
> > PREEMPT_RT."), the wait context test for mutex usage within
> > "in softirq context" fails as it references @softirq_context.
> >
> > [ 0.184549] | wait context tests |
> > [ 0.184549] --------------------------------------------------------------------------
> > [ 0.184549] | rcu | raw | spin |mutex |
> > [ 0.184549] --------------------------------------------------------------------------
> > [ 0.184550] in hardirq context: ok | ok | ok | ok |
> > [ 0.185083] in hardirq context (not threaded): ok | ok | ok | ok |
> > [ 0.185606] in softirq context: ok | ok | ok |FAILED|
> >
> > As a fix, add lockdep map for BH disabled section. This fixes the
> > issue by letting us catch cases when local_bh_disable() gets called
> > with preemption disabled where local_lock doesn't get acquired.
> > In the case of "in softirq context" selftest, local_bh_disable() was
> > being called with preemption disable as it's early in the boot.
> >
> > [boqun: Move the lockdep annotations into __local_bh_*() to avoid false
> > positives because of unpaired local_bh_disable() reported by Borislav
> > Petkov [1] and Peter Zijlstra [2], and make bh_lock_map only exist for
> > PREEMPT_RT]
> >
> > Signed-off-by: Ryo Takakura <ryotkkr98@...il.com>
> > Signed-off-by: Boqun Feng <boqun.feng@...il.com>
> > Link: https://lore.kernel.org/all/20250306122413.GBZ8mT7Z61Tmgnh5Y9@fat_crate.local/ [1]
> > Link: https://lore.kernel.org/lkml/20250307113955.GK16878@noisy.programming.kicks-ass.net/ [2]
> > Link: https://lore.kernel.org/r/20250118054900.18639-1-ryotkkr98@gmail.com
>
> That's a weird SOB chain. Following back the history of the submission
> I believe this line went missing:
>
> From: Ryo Takakura <ryotkkr98@...il.com>
>
> I added it back in to the commit.
>
Thanks! Looks like I lost the "From:" field when I post the draft of v4
at:
https://lore.kernel.org/lkml/Z8t8imzJVhWyDvhC@boqun-archlinux/
I must re-apply that email as a patch to my branch, hence the "From:"
field got changed. Sorry for the mistakes.
Regards,
Boqun
> Thanks,
>
> Ingo
Powered by blists - more mailing lists