From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH nf] netfilter: nf_tables: move dumper state alloation into ->start Date: Tue, 24 Jul 2018 00:07:04 +0200 Message-ID: <20180723220704.flqyeaaiznehmyln@salvia> References: <20180723104714.24008-1-fw@strlen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, cscnull@gmail.com To: Florian Westphal Return-path: Received: from mail.us.es ([193.147.175.20]:47244 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388153AbeGWXKZ (ORCPT ); Mon, 23 Jul 2018 19:10:25 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id B8368E7B8D for ; Tue, 24 Jul 2018 00:05:07 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id A5AAFDA4C7 for ; Tue, 24 Jul 2018 00:05:07 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20180723104714.24008-1-fw@strlen.de> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Jul 23, 2018 at 12:47:14PM +0200, Florian Westphal wrote: > Shaochun Chen points out we leak dumper filter state allocations > stored in dump_control->data in case there is an error before netlink sets > cb_running (after which ->done will be called at some point). > > In order to fix this, add .start functions and do the allocations > there. > > ->done is going to clean up, and in case error occurs before > ->start invocation no cleanups need to be done anymore. Applied, thanks Florian.