diff options
author | Michal Hocko <mhocko@suse.cz> | 2015-09-09 00:01:13 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-09 00:35:28 +0200 |
commit | a03f1f058969ec350fb7451a6fbca23096ee5727 (patch) | |
tree | b6745897f8969fe99a4a514b9d76eaaa167ff84d /Documentation/trace | |
parent | memcg: restructure mem_cgroup_can_attach() (diff) | |
download | linux-a03f1f058969ec350fb7451a6fbca23096ee5727.tar.xz linux-a03f1f058969ec350fb7451a6fbca23096ee5727.zip |
memcg, tcp_kmem: check for cg_proto in sock_update_memcg
sk_prot->proto_cgroup is allowed to return NULL but sock_update_memcg
doesn't check for NULL. The function relies on the mem_cgroup_is_root
check because we shouldn't get NULL otherwise because mem_cgroup_from_task
will always return !NULL.
All other callers are checking for NULL and we can safely replace
mem_cgroup_is_root() check by cg_proto != NULL which will be more
straightforward (proto_cgroup returns NULL for the root memcg already).
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/trace')
0 files changed, 0 insertions, 0 deletions