[PATCH v6 0/2] Make printing of spin_dump() deferred to avoid a deadlock

From: Byungchul Park
Date: Fri Mar 11 2016 - 05:37:23 EST

changes from v5 to v6
- define the problem clearly and solve it by using irq work.

changes from v4 to v5
- found out a clear scenario which make a system crazy. at least it
should not be caused by the debug code.

changes from v3 to v4
- reuse a existing code as much as possible for preventing an infinite
recursive cycle.

changes from v2 to v3
- avoid printk() only in case of lockup suspected, not real lockup in
which case it does not help at all.
- consider not only console_sem.lock but also logbuf_lock which is used
by printk().

changes from v1 to v2
- only change comment and commit message esp. replacing "deadlock" with
"infinite recursive cycle", since it is not an actual deadlock.


Byungchul Park (2):
printk: Factor out buffering and irq work queuing in printk_deferred
printk: Make printing of spin_dump() deferred to avoid a deadlock

include/linux/printk.h | 11 +++++++++++
kernel/locking/spinlock_debug.c | 33 ++++++++++++++++++++++++++++++++-
kernel/printk/printk.c | 25 ++++++++++++++++++++++---
3 files changed, 65 insertions(+), 4 deletions(-)