File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ int __read_mostly sysctl_hung_task_warnings = 10;
44
44
45
45
static int __read_mostly did_panic ;
46
46
static bool hung_task_show_lock ;
47
+ static bool hung_task_call_panic ;
47
48
48
49
static struct task_struct * watchdog_task ;
49
50
@@ -127,10 +128,8 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
127
128
touch_nmi_watchdog ();
128
129
129
130
if (sysctl_hung_task_panic ) {
130
- if (hung_task_show_lock )
131
- debug_show_all_locks ();
132
- trigger_all_cpu_backtrace ();
133
- panic ("hung_task: blocked tasks" );
131
+ hung_task_show_lock = true;
132
+ hung_task_call_panic = true;
134
133
}
135
134
}
136
135
@@ -193,6 +192,10 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
193
192
rcu_read_unlock ();
194
193
if (hung_task_show_lock )
195
194
debug_show_all_locks ();
195
+ if (hung_task_call_panic ) {
196
+ trigger_all_cpu_backtrace ();
197
+ panic ("hung_task: blocked tasks" );
198
+ }
196
199
}
197
200
198
201
static long hung_timeout_jiffies (unsigned long last_checked ,
You can’t perform that action at this time.
0 commit comments