From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:35154 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751351AbeBWR1E (ORCPT ); Fri, 23 Feb 2018 12:27:04 -0500 Date: Fri, 23 Feb 2018 12:27:00 -0500 (EST) Message-Id: <20180223.122700.2270857062946139923.davem@davemloft.net> To: aspencer@spacex.com Cc: netdev@vger.kernel.org, claudiu.manoil@freescale.com Subject: Re: [PATCH net] gianfar: simplify FCS handling and fix memory leak From: David Miller In-Reply-To: <20180222190533.GA179652@spacex.com> References: <20180222190533.GA179652@spacex.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: Andy Spencer Date: Thu, 22 Feb 2018 11:05:33 -0800 > Previously, buffer descriptors containing only the frame check sequence > (FCS) were skipped and not added to the skb. However, the page reference > count was still incremented, leading to a memory leak. > > Fixing this inside gfar_add_rx_frag() is difficult due to reserved > memory handling and page reuse. Instead, move the FCS handling to > gfar_process_frame() and trim off the FCS before passing the skb up the > networking stack. > > Signed-off-by: Andy Spencer > Signed-off-by: Jim Gruen Applied, thank you.