Re: [PATCH] memcg: take reference before releasing rcu_read_lock

2013-04-01 Thread Glauber Costa
On 03/30/2013 04:35 AM, Li Zefan wrote: > On 2013/3/29 18:48, Glauber Costa wrote: >> On 03/29/2013 02:28 PM, Li Zefan wrote: >>> The memcg is not referenced, so it can be destroyed at anytime right >>> after we exit rcu read section, so it's not safe to access it. >>> >>> To fix this, we call css_

Re: [PATCH] memcg: take reference before releasing rcu_read_lock

2013-03-31 Thread Kamezawa Hiroyuki
(2013/03/29 19:28), Li Zefan wrote: > The memcg is not referenced, so it can be destroyed at anytime right > after we exit rcu read section, so it's not safe to access it. > > To fix this, we call css_tryget() to get a reference while we're still > in rcu read section. > > This also removes a bog

Re: [PATCH] memcg: take reference before releasing rcu_read_lock

2013-03-29 Thread Li Zefan
On 2013/3/29 18:48, Glauber Costa wrote: > On 03/29/2013 02:28 PM, Li Zefan wrote: >> The memcg is not referenced, so it can be destroyed at anytime right >> after we exit rcu read section, so it's not safe to access it. >> >> To fix this, we call css_tryget() to get a reference while we're still >

Re: [PATCH] memcg: take reference before releasing rcu_read_lock

2013-03-29 Thread Michal Hocko
On Fri 29-03-13 18:28:57, Li Zefan wrote: > The memcg is not referenced, so it can be destroyed at anytime right > after we exit rcu read section, so it's not safe to access it. > > To fix this, we call css_tryget() to get a reference while we're still > in rcu read section. > > This also removes

Re: [PATCH] memcg: take reference before releasing rcu_read_lock

2013-03-29 Thread Glauber Costa
On 03/29/2013 02:28 PM, Li Zefan wrote: > The memcg is not referenced, so it can be destroyed at anytime right > after we exit rcu read section, so it's not safe to access it. > > To fix this, we call css_tryget() to get a reference while we're still > in rcu read section. > > This also removes a

[PATCH] memcg: take reference before releasing rcu_read_lock

2013-03-29 Thread Li Zefan
The memcg is not referenced, so it can be destroyed at anytime right after we exit rcu read section, so it's not safe to access it. To fix this, we call css_tryget() to get a reference while we're still in rcu read section. This also removes a bogus comment above __memcg_create_cache_enqueue().