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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Mar 2015 18:09:20 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Aaron Tomlin <atomlin@...hat.com>
Cc:	akpm@...ux-foundation.org, rientjes@...gle.com,
	dwysocha@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] hung_task: Change hung_task.c to use
	for_each_process_thread()

On 03/17, Aaron Tomlin wrote:
>
> --- a/kernel/hung_task.c
> +++ b/kernel/hung_task.c
> @@ -169,7 +169,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
>  		return;
>  
>  	rcu_read_lock();
> -	do_each_thread(g, t) {
> +	for_each_process_thread(g, t) {
>  		if (!max_count--)
>  			goto unlock;
>  		if (!--batch_count) {
> @@ -180,7 +180,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
>  		/* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
>  		if (t->state == TASK_UNINTERRUPTIBLE)
>  			check_hung_task(t, timeout);
> -	} while_each_thread(g, t);
> +	}


Acked-by: Oleg Nesterov <oleg@...hat.com>



Perhaps it also makes sense to improve this rcu_lock_break a bit...
For example, if 't' is dead but 'g' is alive we can continue the
"for_each_process" part of this double loop. And if 't' is still
alive then we can find the new leader and continue...

But I agree, lets start from this fix, then we will see.

Oleg.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ