check_hung_task(): unsigned sysctl_hung_task_warnings cannot be less than 0
PATCH 1/1 check_hung_task(): unsigned sysctl_hung_task_warnings cannot be less than 0
unsigned sysctl_hung_task_warnings cannot be less than 0
---
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--;
kernel/softlockup.c +1 -1
@@ -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--;
Ingo Molnar
AppliedQuoted 6 lines · Roel Kluin
unsigned
sysctl_hung_task_warningscannot be less than 0Signed-off-by Roel Kluin <[email protected]>---
inkernel/softlockup.c
Quoted 8 lines
unsigned long
__read_mostlysysctl_hung_task_warnings= 10;
...
static voidcheck_hung_task()
{
...
if (sysctl_hung_task_warnings< 0)
return
sysctl_hung_task_warnings--;
applied to tip/core/urgent, thanks Roel!
Note, i changed the check to !0 instead - see below.
Ingo
-------------->
Quoted 1 line
From
201955463a5c1a70d3f70d1598b27e4c2c402642Mon Sep 17 00:00:00 2001
From: Roel Kluin <[email protected]>
Date: Tue, 2 Dec 2008 22:55:38 +0100
Subject: [PATCH] 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
--- kernel/softlockup.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/softlockup.c +1 -1
@@ -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--;