From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752195AbcISPn2 (ORCPT ); Mon, 19 Sep 2016 11:43:28 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:34298 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbcISPn0 (ORCPT ); Mon, 19 Sep 2016 11:43:26 -0400 Date: Mon, 19 Sep 2016 18:43:21 +0300 From: Vladimir Davydov To: Johannes Weiner Cc: Andrew Morton , Tejun Heo , "David S. Miller" , Michal Hocko , linux-mm@kvack.org, cgroups@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 2/3] cgroup: duplicate cgroup reference when cloning sockets Message-ID: <20160919154321.GG1989@esperanza> References: <20160914194846.11153-1-hannes@cmpxchg.org> <20160914194846.11153-2-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160914194846.11153-2-hannes@cmpxchg.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 14, 2016 at 03:48:45PM -0400, Johannes Weiner wrote: > From: Johannes Weiner > > 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: # 4.5+ > Signed-off-by: Johannes Weiner Reviewed-by: Vladimir Davydov