check_hung_task(): unsigned sysctl_hung_task_warnings cannot be less than 0
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 2 Dec 2008 21:55:38 +0000 (22:55 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 3 Dec 2008 09:11:51 +0000 (10:11 +0100)
Impact: fix warnings-limit cutoff check for debug feature

unsigned sysctl_hung_task_warnings cannot be less than 0

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/softlockup.c

index 3953e4aed733d32284f48ecfffa1fbff05e234c6..dc0b3be6b7d52cb98bd84d599bfbb7e7d85b1e85 100644 (file)
@@ -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)
                return;
        sysctl_hung_task_warnings--;