lkml.org 
[lkml]   [2015]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 6/8] memcg, tcp_kmem: check for cg_proto in sock_update_memcg
    On Wed, Jul 08, 2015 at 02:27:50PM +0200, Michal Hocko wrote:
    > From: Michal Hocko <mhocko@suse.cz>
    >
    > 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>


    \
     
     \ /
      Last update: 2015-07-08 18:41    [W:4.141 / U:0.196 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site