From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] macvlan: Fix one possible double free Date: Tue, 02 Jan 2018 13:30:56 -0500 (EST) Message-ID: <20180102.133056.126140071547989446.davem@davemloft.net> References: <1514295872-120876-1-git-send-email-gfree.wind@vip.163.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: gfree.wind@vip.163.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:50692 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751063AbeABSa5 (ORCPT ); Tue, 2 Jan 2018 13:30:57 -0500 In-Reply-To: <1514295872-120876-1-git-send-email-gfree.wind@vip.163.com> Sender: netdev-owner@vger.kernel.org List-ID: aFrom: gfree.wind@vip.163.com Date: Tue, 26 Dec 2017 21:44:32 +0800 > From: Gao Feng > > Because the macvlan_uninit would free the macvlan port, so there is one > double free case in macvlan_common_newlink. When the macvlan port is just > created, then register_netdevice or netdev_upper_dev_link failed and they > would invoke macvlan_uninit. Then it would reach the macvlan_port_destroy > which triggers the double free. > > Signed-off-by: Gao Feng Applied.