diff options
author | Li Zefan <lizefan@huawei.com> | 2013-04-30 00:08:57 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 00:54:40 +0200 |
commit | ca0dde97178e75ed1370b8616326f5496a803d65 (patch) | |
tree | b16a3376d70d0da276ee77a86a0c57c4acd7d457 /drivers/rpmsg | |
parent | mem hotunplug: fix kfree() of bootmem memory (diff) | |
download | linux-ca0dde97178e75ed1370b8616326f5496a803d65.tar.xz linux-ca0dde97178e75ed1370b8616326f5496a803d65.zip |
memcg: take reference before releasing rcu_read_lock
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().
Signed-off-by: Li Zefan <lizefan@huawei.com>
Acked-by: Glauber Costa <glommer@parallels.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rpmsg')
0 files changed, 0 insertions, 0 deletions