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]
Message-Id: <20100617084154.FB33.A69D9226@jp.fujitsu.com>
Date:	Thu, 17 Jun 2010 10:51:33 +0900 (JST)
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Minchan Kim <minchan.kim@...il.com>
Cc:	kosaki.motohiro@...fujitsu.com,
	LKML <linux-kernel@...r.kernel.org>,
	linux-mm <linux-mm@...ck.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Rientjes <rientjes@...gle.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [PATCH 3/9] oom: oom_kill_process() doesn't select kthread child

> On Wed, Jun 16, 2010 at 08:32:08PM +0900, KOSAKI Motohiro wrote:
> > Now, select_bad_process() have PF_KTHREAD check, but oom_kill_process
> > doesn't. It mean oom_kill_process() may choose wrong task, especially,
> > when the child are using use_mm().
> Now oom_kill_process is called by three place. 
> 
> 1. mem_cgroup_out_of_memory
> 2. out_of_memory with sysctl_oom_kill_allocating_task
> 3. out_of_memory with non-sysctl_oom_kill_allocating_task
> 
> I think it's no problem in 1 and 3 since select_bad_process already checks
> PF_KTHREAD. The problem in in 2. 
> So How about put the check before calling oom_kill_process in case of
> sysctl_oom_kill_allocating task?
> 
> if (sysctl_oom_kill_allocating_task) {
>         if (!current->flags & PF_KTHREAD)
>                 oom_kill_process();
>                         
> It can remove duplicated PF_KTHREAD check in select_bad_process and
> oom_kill_process. 

This patch changed child selection logic. select_bad_process() doesn't
check victim's child. IOW, this is necessary when all 1-3.



--
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