Commit 4b22183d authored by Paul E. McKenney's avatar Paul E. McKenney Committed by sanglipeng
Browse files

rcu: Make RCU_LOCKDEP_WARN() avoid early lockdep checks

stable inclusion
from stable-v5.10.173
commit f5657f3306031d4ee338d1a91ea5115f0f9c7af7
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f5657f3306031d4ee338d1a91ea5115f0f9c7af7



--------------------------------

[ Upstream commit 0cae5ded ]

Currently, RCU_LOCKDEP_WARN() checks the condition before checking
to see if lockdep is still enabled.  This is necessary to avoid the
false-positive splats fixed by commit 30668200 ("rcu: Reject
RCU_LOCKDEP_WARN() false positives").  However, the current state can
result in false-positive splats during early boot before lockdep is fully
initialized.  This commit therefore checks debug_lockdep_rcu_enabled()
both before and after checking the condition, thus avoiding both sets
of false-positive error reports.

Reported-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Reported-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Reported-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Reviewed-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent c54535ab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment