linux/include
Petr Mladek b87f02307d printk: Wait for the global console lock when the system is going down
There are reports that the console kthreads block the global console
lock when the system is going down, for example, reboot, panic.

First part of the solution was to block kthreads in these problematic
system states so they stopped handling newly added messages.

Second part of the solution is to wait when for the kthreads when
they are actively printing. It solves the problem when a message
was printed before the system entered the problematic state and
the kthreads managed to step in.

A busy waiting has to be used because panic() can be called in any
context and in an unknown state of the scheduler.

There must be a timeout because the kthread might get stuck or sleeping
and never release the lock. The timeout 10s is an arbitrary value
inspired by the softlockup timeout.

Link: https://lore.kernel.org/r/20220610205038.GA3050413@paulmck-ThinkPad-P17-Gen-1
Link: https://lore.kernel.org/r/CAMdYzYpF4FNTBPZsEFeWRuEwSies36QM_As8osPWZSr2q-viEA@mail.gmail.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Tested-by: Paul E. McKenney <paulmck@kernel.org>
Link: https://lore.kernel.org/r/20220615162805.27962-3-pmladek@suse.com
2022-06-15 22:04:15 +02:00
..
acpi Power management updates for 5.19-rc1 2022-05-24 16:04:25 -07:00
asm-generic Scheduler changes in this cycle were: 2022-05-24 11:11:13 -07:00
clocksource clocksource/drivers: Add a goldfish-timer clocksource 2022-04-11 11:48:01 +02:00
crypto
drm
dt-bindings dt-bindings: clk: mpfs: add defines for two new clocks 2022-04-22 18:40:15 -07:00
keys KEYS: trusted: Introduce support for NXP CAAM-based trusted keys 2022-05-23 18:47:50 +03:00
kunit
kvm
linux printk: Wait for the global console lock when the system is going down 2022-06-15 22:04:15 +02:00
math-emu
media media: h264: Sort p/b reflist using frame_num 2022-05-17 10:02:29 +02:00
memory memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode 2022-04-21 17:00:24 +02:00
misc
net Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec 2022-05-18 12:47:36 +01:00
pcmcia
ras
rdma
scsi scsi: iscsi: Fix NOP handling during conn recovery 2022-04-11 22:09:35 -04:00
soc Power management updates for 5.19-rc1 2022-05-24 16:04:25 -07:00
sound ASoC: Fixes for v5.18 2022-04-19 17:26:01 +02:00
target target: pass a block_device to target_configure_unmap_from_queue 2022-04-17 19:49:58 -06:00
trace Page cache changes for 5.19 2022-05-24 19:55:07 -07:00
uapi linux/types.h: reinstate "__bitwise__" macro for user space use 2022-05-25 10:08:59 -07:00
vdso
video
xen xen: sync xs_wire.h header with upstream xen 2022-05-19 14:44:05 +02:00