From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v3 net-next] veth: Free queues on link delete Date: Thu, 16 Aug 2018 12:22:56 -0700 (PDT) Message-ID: <20180816.122256.7265384004790675.davem@davemloft.net> References: <1534320449-2433-1-git-send-email-makita.toshiaki@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, dsahern@gmail.com, dsahern@kernel.org To: makita.toshiaki@lab.ntt.co.jp Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:60668 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbeHPWXP (ORCPT ); Thu, 16 Aug 2018 18:23:15 -0400 In-Reply-To: <1534320449-2433-1-git-send-email-makita.toshiaki@lab.ntt.co.jp> Sender: netdev-owner@vger.kernel.org List-ID: From: Toshiaki Makita Date: Wed, 15 Aug 2018 17:07:29 +0900 > David Ahern reported memory leak in veth. ... > veth_rq allocated in veth_newlink() was not freed on dellink. > > We need to free up them after veth_close() so that any packets will not > reference the queues afterwards. Thus free them in veth_dev_free() in > the same way as freeing stats structure (vstats). > > Also move queues allocation to veth_dev_init() to be in line with stats > allocation. > > Fixes: 638264dc90227 ("veth: Support per queue XDP ring") > Reported-by: David Ahern > Signed-off-by: Toshiaki Makita Applied, thank you.