From mboxrd@z Thu Jan 1 00:00:00 1970 From: Antoine Tenart Subject: Re: [PATCH net-next 1/6] net: mvpp2: only free the TSO header buffers when it was allocated Date: Fri, 8 Dec 2017 09:28:39 +0100 Message-ID: <20171208082839.GC4359@kwain> References: <20171207084903.27144-1-antoine.tenart@free-electrons.com> <20171207084903.27144-2-antoine.tenart@free-electrons.com> <20171207.145329.1140922105125090186.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: antoine.tenart@free-electrons.com, gregory.clement@free-electrons.com, thomas.petazzoni@free-electrons.com, miquel.raynal@free-electrons.com, nadavh@marvell.com, mw@semihalf.com, stefanc@marvell.com, ymarkman@marvell.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: David Miller Return-path: Content-Disposition: inline In-Reply-To: <20171207.145329.1140922105125090186.davem@davemloft.net> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Thu, Dec 07, 2017 at 02:53:29PM -0500, David Miller wrote: > From: Antoine Tenart > Date: Thu, 7 Dec 2017 09:48:58 +0100 > > > This patch adds a check to only free the TSO header buffer when its > > allocation previously succeeded. > > > > Signed-off-by: Antoine Tenart > > No, please keep this as a failure to bring up. > > Even if you emit a log message, it is completely unintuitive to > have netdev features change on the user just because of a memory > allocation failure. One thing I forgot, this patch still is needed for a proper error path handling. We can't be sure all buffers were allocated correctly when calling mvpp2_txq_deinit() (e.g. if one of them was the reason of the fail). I'll send a v2 without the patch 2/6, but I'll keep this one. Thanks, Antoine -- Antoine Ténart, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com