aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hung_task.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/hung_task.c')
-rw-r--r--kernel/hung_task.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index 9328b80eaf14..0b9c169d577f 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -37,7 +37,7 @@ int __read_mostly sysctl_hung_task_check_count = PID_MAX_LIMIT;
37 */ 37 */
38unsigned long __read_mostly sysctl_hung_task_timeout_secs = CONFIG_DEFAULT_HUNG_TASK_TIMEOUT; 38unsigned long __read_mostly sysctl_hung_task_timeout_secs = CONFIG_DEFAULT_HUNG_TASK_TIMEOUT;
39 39
40unsigned long __read_mostly sysctl_hung_task_warnings = 10; 40int __read_mostly sysctl_hung_task_warnings = 10;
41 41
42static int __read_mostly did_panic; 42static int __read_mostly did_panic;
43 43
@@ -98,7 +98,9 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
98 98
99 if (!sysctl_hung_task_warnings) 99 if (!sysctl_hung_task_warnings)
100 return; 100 return;
101 sysctl_hung_task_warnings--; 101
102 if (sysctl_hung_task_warnings > 0)
103 sysctl_hung_task_warnings--;
102 104
103 /* 105 /*
104 * Ok, the task did not get scheduled for more than 2 minutes, 106 * Ok, the task did not get scheduled for more than 2 minutes,