https://github.com/torvalds/linux
Revision cccd32816506cbac3a4c65d9dff51b3125ef1a03 authored by Lukas Wunner on 15 September 2023, 07:55:39 UTC, committed by Ingo Molnar on 15 September 2023, 09:28:08 UTC
Commit:

  5a5d7e9badd2 ("cpuidle: lib/bug: Disable rcu_is_watching() during WARN/BUG")

amended warn_slowpath_fmt() to disable preemption until the WARN splat
has been emitted.

However the commit neglected to reenable preemption in the !fmt codepath,
i.e. when a WARN splat is emitted without additional format string.

One consequence is that users may see more splats than intended.  E.g. a
WARN splat emitted in a work item results in at least two extra splats:

  BUG: workqueue leaked lock or atomic
  (emitted by process_one_work())

  BUG: scheduling while atomic
  (emitted by worker_thread() -> schedule())

Ironically the point of the commit was to *avoid* extra splats. ;)

Fix it.

Fixes: 5a5d7e9badd2 ("cpuidle: lib/bug: Disable rcu_is_watching() during WARN/BUG")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Paul E. McKenney <paulmck@kernel.org>
Link: https://lore.kernel.org/r/3ec48fde01e4ee6505f77908ba351bad200ae3d1.1694763684.git.lukas@wunner.de
1 parent 9fdfb15
History
Tip revision: cccd32816506cbac3a4c65d9dff51b3125ef1a03 authored by Lukas Wunner on 15 September 2023, 07:55:39 UTC
panic: Reenable preemption in WARN slowpath
Tip revision: cccd328
File Mode Size
alloc
bindings
kernel
macros
uapi
.gitignore -rw-r--r-- 202 bytes
Makefile -rw-r--r-- 19.3 KB
bindgen_parameters -rw-r--r-- 691 bytes
build_error.rs -rw-r--r-- 1.3 KB
compiler_builtins.rs -rw-r--r-- 2.0 KB
exports.c -rw-r--r-- 862 bytes
helpers.c -rw-r--r-- 4.6 KB

back to top