diff --git a/kernel/hung_task.c b/kernel/hung_task.c index cff3ae8c818f..adc2c2ac9d94 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -204,8 +204,21 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout) } unlock: rcu_read_unlock(); - if (hung_task_show_lock) - debug_show_all_locks(); + if (hung_task_show_lock) { + pr_warn("\nShowing all threads with locks held in the system:\n"); + rcu_read_lock(); + for_each_process_thread(g, t) { + if (t->lockdep_depth && t != current) { + sched_show_task(t); + debug_show_held_locks(t); + touch_nmi_watchdog(); + touch_all_softlockup_watchdogs(); + } + } + rcu_read_unlock(); + pr_warn("\n"); + pr_warn("=============================================\n\n"); + } if (hung_task_show_all_bt) { hung_task_show_all_bt = false;