]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
printk: For @suppress_panic_printk check for other CPU in panic
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 7 Feb 2024 13:40:55 +0000 (14:46 +0106)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Apr 2024 11:07:29 +0000 (13:07 +0200)
commita2e14cc2da40221604dd4cd37118bbbd8a16174a
tree0a4c5a6912e631d05fdc35ac3121c1160fdb44d8
parentdbd3c05d71e1810f0b3e7cc1d0dd680845bd8c84
printk: For @suppress_panic_printk check for other CPU in panic

[ Upstream commit 0ab7cdd00491b532591ef065be706301de7e448f ]

Currently @suppress_panic_printk is checked along with
non-matching @panic_cpu and current CPU. This works
because @suppress_panic_printk is only set when
panic_in_progress() is true.

Rather than relying on the @suppress_panic_printk semantics,
use the concise helper function other_cpu_in_progress(). The
helper function exists to avoid open coding such tests.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240207134103.1357162-7-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/printk/printk.c