Re: [PATCH 2/3] cgroup: duplicate cgroup reference when cloning sockets
From: Vladimir Davydov
Date: Mon Sep 19 2016 - 11:43:30 EST
On Wed, Sep 14, 2016 at 03:48:45PM -0400, Johannes Weiner wrote:
> From: Johannes Weiner <jweiner@xxxxxx>
>
> 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")
> Cc: <stable@xxxxxxxxxxxxxxx> # 4.5+
> Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
Reviewed-by: Vladimir Davydov <vdavydov.dev@xxxxxxxxx>