Commit 20195546 authored by Roel Kluin's avatar Roel Kluin Committed by Ingo Molnar

check_hung_task(): unsigned sysctl_hung_task_warnings cannot be less than 0

Impact: fix warnings-limit cutoff check for debug feature

unsigned sysctl_hung_task_warnings cannot be less than 0
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 02d43b1d
...@@ -188,7 +188,7 @@ static void check_hung_task(struct task_struct *t, unsigned long now) ...@@ -188,7 +188,7 @@ static void check_hung_task(struct task_struct *t, unsigned long now)
if ((long)(now - t->last_switch_timestamp) < if ((long)(now - t->last_switch_timestamp) <
sysctl_hung_task_timeout_secs) sysctl_hung_task_timeout_secs)
return; return;
if (sysctl_hung_task_warnings < 0) if (!sysctl_hung_task_warnings)
return; return;
sysctl_hung_task_warnings--; sysctl_hung_task_warnings--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment