From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Gushchin Subject: Re: [PATCH net] net: memcontrol: charge allocated memory after mem_cgroup_sk_alloc() Date: Thu, 1 Feb 2018 20:22:04 +0000 Message-ID: <20180201202158.GA11477@castle.DHCP.thefacebook.com> References: <20180125001911.15597-1-guro@fb.com> <20180125.120302.1117695034222616751.davem@davemloft.net> <20180131215401.GA8956@castle> <20180201.101655.1316424669256047119.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: "David S. Miller" , , , , , , To: Eric Dumazet Return-path: Content-Disposition: inline In-Reply-To: <20180201.101655.1316424669256047119.davem@davemloft.net> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Thu, Feb 01, 2018 at 10:16:55AM -0500, David Miller wrote: > From: Roman Gushchin > Date: Wed, 31 Jan 2018 21:54:08 +0000 > > > So I really start thinking that reverting 9f1c2674b328 > > ("net: memcontrol: defer call to mem_cgroup_sk_alloc()") > > and fixing the original issue differently might be easier > > and a proper way to go. Does it makes sense? > > You'll need to work that out with Eric Dumazet who added the > change in question which you think we should revert. Eric, can you, please, provide some details about the use-after-free problem that you've fixed with commit 9f1c2674b328 ("net: memcontrol: defer call to mem_cgroup_sk_alloc()" ? Do you know how to reproduce it? Deferring mem_cgroup_sk_alloc() breaks socket memory accounting and makes it much more fragile in general. So, I wonder, if there are solutions for the use-after-free problem. Thank you! Roman