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, 23 Aug 2011 15:46:30 +0200
From:	Michal Hocko <mhocko@...e.cz>
To:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
Cc:	linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Oleg Nesterov <oleg@...hat.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	David Rientjes <rientjes@...gle.com>
Subject: Re: [PATCH] oom: skip frozen tasks

On Tue 23-08-11 11:31:01, Konstantin Khlebnikov wrote:
> All frozen tasks are unkillable, and if one of them has TIF_MEMDIE
> we must kill something else to avoid deadlock.

This is a livelock rather than a deadlock, isn't it? We are picking the
same process all the time and cannot do any progress.

> After this patch select_bad_process() will skip frozen task before
> checking TIF_MEMDIE.
> 
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@...nvz.org>

Anyway the patch looks good to me.

Reviewed-by: Michal Hocko <mhocko@...e.cz>

> ---
>  mm/oom_kill.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 626303b..931ab20 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -138,6 +138,8 @@ static bool oom_unkillable_task(struct task_struct *p,
>  		return true;
>  	if (p->flags & PF_KTHREAD)
>  		return true;
> +	if (p->flags & PF_FROZEN)
> +		return true;
>  
>  	/* When mem_cgroup_out_of_memory() and p is not member of the group */
>  	if (mem && !task_in_mem_cgroup(p, mem))
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic
--
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