From: Qian Cai <cai@redhat.com>
To: paulmck@kernel.org
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@kernel.org>, x86 <x86@kernel.org>,
linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Boqun Feng <boqun.feng@gmail.com>
Subject: Re: [tip: locking/core] lockdep: Fix lockdep recursion
Date: Fri, 09 Oct 2020 11:30:38 -0400 [thread overview]
Message-ID: <07fffca72fdd585a96ab8c45761c1ea223dc24f2.camel@redhat.com> (raw)
In-Reply-To: <20201009135837.GD29330@paulmck-ThinkPad-P72>
On Fri, 2020-10-09 at 06:58 -0700, Paul E. McKenney wrote:
> On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote:
> > On Fri, 2020-10-09 at 07:58 +0000, tip-bot2 for Peter Zijlstra wrote:
> > > The following commit has been merged into the locking/core branch of tip:
> > >
> > > Commit-ID: 4d004099a668c41522242aa146a38cc4eb59cb1e
> > > Gitweb:
> > > https://git.kernel.org/tip/4d004099a668c41522242aa146a38cc4eb59cb1e
> > > Author: Peter Zijlstra <peterz@infradead.org>
> > > AuthorDate: Fri, 02 Oct 2020 11:04:21 +02:00
> > > Committer: Ingo Molnar <mingo@kernel.org>
> > > CommitterDate: Fri, 09 Oct 2020 08:53:30 +02:00
> > >
> > > lockdep: Fix lockdep recursion
> > >
> > > Steve reported that lockdep_assert*irq*(), when nested inside lockdep
> > > itself, will trigger a false-positive.
> > >
> > > One example is the stack-trace code, as called from inside lockdep,
> > > triggering tracing, which in turn calls RCU, which then uses
> > > lockdep_assert_irqs_disabled().
> > >
> > > Fixes: a21ee6055c30 ("lockdep: Change hardirq{s_enabled,_context} to per-
> > > cpu
> > > variables")
> > > Reported-by: Steven Rostedt <rostedt@goodmis.org>
> > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> > > Signed-off-by: Ingo Molnar <mingo@kernel.org>
> >
> > Reverting this linux-next commit fixed booting RCU-list warnings everywhere.
>
> Is it possible that the RCU-list warnings were being wrongly suppressed
> without a21ee6055c30? As in are you certain that these RCU-list warnings
> are in fact false positives?
I guess you mean this commit a046a86082cc ("lockdep: Fix lockdep recursion")
instead of a21ee6055c30. It is unclear to me how that commit a046a86082cc would
suddenly start to generate those warnings, although I can see it starts to use
percpu variables even though the CPU is not yet set online.
DECLARE_PER_CPU(unsigned int, lockdep_recursion);
Anyway, the problem is that when we in the early boot:
start_secondary()
smp_init_secondary()
init_cpu_timer()
clockevents_register_device()
We are taking a lock there but the CPU is not yet online, and the
__lock_acquire() would call things like hlist_for_each_entry_rcu() from
lookup_chain_cache() or register_lock_class(). Thus, triggering the RCU-list
from an offline CPU warnings.
I am not entirely sure how to fix those though.
next prev parent reply other threads:[~2020-10-09 15:31 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <160223032121.7002.1269740091547117869.tip-bot2@tip-bot2>
2020-10-09 13:41 ` [tip: locking/core] lockdep: Fix lockdep recursion Qian Cai
2020-10-09 13:58 ` Paul E. McKenney
2020-10-09 15:30 ` Qian Cai [this message]
2020-10-09 16:11 ` Paul E. McKenney
2020-10-09 16:23 ` Peter Zijlstra
2020-10-09 16:37 ` Paul E. McKenney
2020-10-09 17:36 ` Qian Cai
2020-10-09 17:50 ` Paul E. McKenney
2020-10-09 17:54 ` Qian Cai
2020-10-09 18:21 ` Paul E. McKenney
2020-10-12 3:11 ` Boqun Feng
2020-10-12 14:14 ` Qian Cai
2020-10-12 21:28 ` Paul E. McKenney
2020-10-13 10:34 ` Peter Zijlstra
2020-10-13 10:44 ` Peter Zijlstra
2020-10-13 11:25 ` Peter Zijlstra
2020-10-13 16:26 ` Paul E. McKenney
2020-10-13 19:30 ` Paul E. McKenney
2020-10-14 18:34 ` Paul E. McKenney
2020-10-14 21:53 ` Peter Zijlstra
2020-10-14 22:11 ` Paul E. McKenney
2020-10-14 22:39 ` Peter Zijlstra
2020-10-14 23:55 ` Paul E. McKenney
2020-10-15 3:41 ` Paul E. McKenney
2020-10-15 9:49 ` Peter Zijlstra
2020-10-15 9:50 ` Peter Zijlstra
2020-10-15 16:15 ` Paul E. McKenney
2020-10-15 9:52 ` Peter Zijlstra
2020-10-15 16:20 ` Paul E. McKenney
2020-10-15 16:15 ` Paul E. McKenney
2020-10-15 17:23 ` Paul E. McKenney
2020-10-13 16:15 ` Paul E. McKenney
2020-10-13 10:27 ` Peter Zijlstra
2020-10-13 16:24 ` Boqun Feng
2020-10-27 19:31 ` Qian Cai
2020-10-28 3:01 ` Paul E. McKenney
2020-10-28 14:39 ` Qian Cai
2020-10-28 15:53 ` Paul E. McKenney
2020-10-28 20:08 ` Qian Cai
2020-10-28 21:02 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07fffca72fdd585a96ab8c45761c1ea223dc24f2.camel@redhat.com \
--to=cai@redhat.com \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sfr@canb.auug.org.au \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).