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, 3 Feb 2009 11:05:51 +0530
From:	Balbir Singh <balbir@...ux.vnet.ibm.com>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	David Rientjes <rientjes@...gle.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"nishimura@....nes.nec.co.jp" <nishimura@....nes.nec.co.jp>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [-mm patch] Show memcg information during OOM

* Li Zefan <lizf@...fujitsu.com> [2009-02-03 13:24:34]:

> David Rientjes wrote:
> > On Tue, 3 Feb 2009, Balbir Singh wrote:
> > 
> >>>> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> >>>> index d3b9bac..b8e53ae 100644
> >>>> --- a/mm/oom_kill.c
> >>>> +++ b/mm/oom_kill.c
> >>>> @@ -392,6 +392,7 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
> >>>>  			current->comm, gfp_mask, order, current->oomkilladj);
> >>>>  		task_lock(current);
> >>>>  		cpuset_print_task_mems_allowed(current);
> >>>> +		mem_cgroup_print_mem_info(mem);
> >>> I think this can be put outside the task lock. The lock is used to call task_cs() safely in
> >>> cpuset_print_task_mems_allowed().
> >>>
> >> Thanks, I'll work on that in the next version.
> >>  
> > 
> > I was also wondering about this and assumed that it was necessary to 
> > prevent the cgroup from disappearing during the oom.  If task_lock() isn't 
> > held, is the memcg->css.cgroup->dentry->d_name.name dereference always 
> > safe without rcu?
> > 
> 
> The cgroup won't disappear, since mem_cgroup_out_of_memory() is called with memcg's css refcnt
> increased. :)
>

And this as well, yes!
 

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