From: Tetsuo Handa Date: Tue, 13 Dec 2016 00:45:35 +0000 (-0800) Subject: hung_task: decrement sysctl_hung_task_warnings only if it is positive X-Git-Tag: v4.14-rc1~1942^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ca5ede07c9871c13ae422c96d6d08dbd0df5eda;p=platform%2Fkernel%2Flinux-rpi3.git hung_task: decrement sysctl_hung_task_warnings only if it is positive Since sysctl_hung_task_warnings == -1 is allowed (infinite warnings), commit 48a6d64edadb ("hung_task: allow hung_task_panic when hung_task_warnings is 0") should decrement it only when it is not -1. This prevents the kernel from ceasing warnings after the first 4294967295 ;) Signed-off-by: Tetsuo Handa Cc: John Siddle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 2b59c82..40c07e4 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -106,7 +106,8 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) * complain: */ if (sysctl_hung_task_warnings) { - sysctl_hung_task_warnings--; + if (sysctl_hung_task_warnings > 0) + sysctl_hung_task_warnings--; pr_err("INFO: task %s:%d blocked for more than %ld seconds.\n", t->comm, t->pid, timeout); pr_err(" %s %s %.*s\n",