[PATCH printk v1 0/2] Fix ABBA deadlock for legacy printing with cpu_sync
From: John Ogness
Date: Mon Dec 09 2024 - 06:17:57 EST
Hi,
An RFC patch [0] was posted to fix an ABBA deadlock related to
nmi_backtrace() and dump_stack_lvl(). However, the underlying
problem was trying to perform legacy printing while holding the
printk_cpu_sync.
This series causes legacy printing to defer when holding the
printk_cpu_sync.
The first patch in the series is not necessary for the deadlock
fix, but was a redundancy I noticed while working on the series.
John Ogness
[0] https://lore.kernel.org/lkml/20240715232052.73eb7fb1@xxxxxxxxxxxxxxxxxxxx
John Ogness (2):
printk: Remove redundant deferred check in vprintk()
printk: Defer legacy printing when holding printk_cpu_sync
kernel/printk/internal.h | 6 ++++++
kernel/printk/printk.c | 5 +++++
kernel/printk/printk_safe.c | 16 ++++++----------
3 files changed, 17 insertions(+), 10 deletions(-)
base-commit: 4022ef25504db2fb79a2acac0afe9bac934f8dd6
--
2.39.5