[PATCH] check_hung_task(): unsigned sysctl_hung_task_warnings cannotbe less than 0

From: Roel Kluin
Date: Tue Dec 02 2008 - 16:55:49 EST


unsigned sysctl_hung_task_warnings cannot be less than 0

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
in kernel/softlockup.c

unsigned long __read_mostly sysctl_hung_task_warnings = 10;
...
static void check_hung_task()
{
...
if (sysctl_hung_task_warnings < 0)
return
sysctl_hung_task_warnings--;

diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 3953e4a..a50a5db 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -188,7 +188,7 @@ static void check_hung_task(struct task_struct *t, unsigned long now)
if ((long)(now - t->last_switch_timestamp) <
sysctl_hung_task_timeout_secs)
return;
- if (sysctl_hung_task_warnings < 0)
+ if (sysctl_hung_task_warnings == -1)
return;
sysctl_hung_task_warnings--;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/