From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: Re: [bpf-next PATCH 1/2] bpf: sockmap, free memory on sock close with cork data Date: Mon, 2 Apr 2018 12:58:15 -0700 Message-ID: References: <20180402195046.10055.11686.stgit@john-Precision-Tower-5810> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net To: ast@kernel.org, daniel@iogearbox.net Return-path: Received: from mail-pl0-f45.google.com ([209.85.160.45]:34805 "EHLO mail-pl0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756630AbeDBT61 (ORCPT ); Mon, 2 Apr 2018 15:58:27 -0400 Received: by mail-pl0-f45.google.com with SMTP id u11-v6so5548671plq.1 for ; Mon, 02 Apr 2018 12:58:27 -0700 (PDT) In-Reply-To: <20180402195046.10055.11686.stgit@john-Precision-Tower-5810> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 04/02/2018 12:50 PM, John Fastabend wrote: > If a socket with pending cork data is closed we do not return the > memory to the socket until the garbage collector free's the psock > structure. The garbage collector though can run after the sock has > completed its close operation. If this ordering happens the sock code > will through a WARN_ON because there is still outstanding memory > accounted to the sock. > > To resolve this ensure we return memory to the sock when a socket > is closed. > > Signed-off-by: John Fastabend > Fixes: 91843d540a13 ("bpf: sockmap, add msg_cork_bytes() helper") > --- Hi Alexei, Daniel, These two fixes apply against current bpf-next or bpf after bpf-next is merged. I could resend later I suppose but I think it makes sense to get these in sooner rather than later. Thanks, John