]> Git Repo - linux.git/commit
cgroup: duplicate cgroup reference when cloning sockets
authorJohannes Weiner <[email protected]>
Mon, 19 Sep 2016 21:44:38 +0000 (14:44 -0700)
committerLinus Torvalds <[email protected]>
Mon, 19 Sep 2016 22:36:17 +0000 (15:36 -0700)
commitd979a39d7242e0601bf9b60e89628fb8ac577179
treef790aa92992c9bf54088de8d8bf0fa275252ab1f
parentdb2ba40c277dc545bab531671c3f45ac0afea6f8
cgroup: duplicate cgroup reference when cloning sockets

When a socket is cloned, the associated sock_cgroup_data is duplicated
but not its reference on the cgroup.  As a result, the cgroup reference
count will underflow when both sockets are destroyed later on.

Fixes: bd1060a1d671 ("sock, cgroup: add sock->sk_cgroup")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Johannes Weiner <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Cc: <[email protected]> [4.5+]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/cgroup.c
net/core/sock.c
This page took 0.056598 seconds and 4 git commands to generate.