From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] vmxnet3: repair memory leak Date: Tue, 23 Jan 2018 19:58:39 -0500 (EST) Message-ID: <20180123.195839.1025412103690413060.davem@davemloft.net> References: <20180122210637.8254-1-nhorman@tuxdriver.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, boyang@redhat.com, skhare@vmware.com, pv-drivers@vmware.com To: nhorman@tuxdriver.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:34828 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932273AbeAXA6n (ORCPT ); Tue, 23 Jan 2018 19:58:43 -0500 In-Reply-To: <20180122210637.8254-1-nhorman@tuxdriver.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Neil Horman Date: Mon, 22 Jan 2018 16:06:37 -0500 > with the introduction of commit > b0eb57cb97e7837ebb746404c2c58c6f536f23fa, it appears that rq->buf_info > is improperly handled. While it is heap allocated when an rx queue is > setup, and freed when torn down, an old line of code in > vmxnet3_rq_destroy was not properly removed, leading to rq->buf_info[0] > being set to NULL prior to its being freed, causing a memory leak, which > eventually exhausts the system on repeated create/destroy operations > (for example, when the mtu of a vmxnet3 interface is changed > frequently. > > Fix is pretty straight forward, just move the NULL set to after the > free. > > Tested by myself with successful results > > Applies to net, and should likely be queued for stable, please > > Signed-off-by: Neil Horman > Reported-By: boyang@redhat.com Applied and queued up for -stable, thanks Neil.