lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 10 Sep 2016 09:18:08 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:     akpm@...ux-foundation.org, jsiddle@...hat.com
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hung_task: Allow hung_task_panic when hung_task_warnings is 0.

Andrew Morton wrote:
> This introduces an off-by-one error.  In the old code, if
> sysctl_hung_task_warnings==1 on entry, we warn.  With the new code, we
> no longer warn.

Since sysctl_hung_task_warnings == -1 is allowed, we should not
sysctl_hung_task_warnings-- unless sysctl_hung_task_warnings > 0.

> 
> This?
> 
> --- a/kernel/hung_task.c~hung_task-allow-hung_task_panic-when-hung_task_warnings-is-0-fix
> +++ a/kernel/hung_task.c
> @@ -101,14 +101,12 @@ static void check_hung_task(struct task_
>  	if (!sysctl_hung_task_warnings && !sysctl_hung_task_panic)
>  		return;
>  
> -	if (sysctl_hung_task_warnings > 0)
> -		sysctl_hung_task_warnings--;
> -
>  	/*
>  	 * Ok, the task did not get scheduled for more than 2 minutes,
>  	 * complain:
>  	 */
>  	if (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",

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ