From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [Patch net] 8021q: fix a memory leak for VLAN 0 device Date: Wed, 10 Jan 2018 15:31:27 -0500 (EST) Message-ID: <20180110.153127.366385711220396218.davem@davemloft.net> References: <20180109214041.26842-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, dvyukov@google.com, vyasevich@gmail.com, ben.hutchings@codethink.co.uk To: xiyou.wangcong@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:54852 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751733AbeAJUb3 (ORCPT ); Wed, 10 Jan 2018 15:31:29 -0500 In-Reply-To: <20180109214041.26842-1-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Cong Wang Date: Tue, 9 Jan 2018 13:40:41 -0800 > A vlan device with vid 0 is allow to creat by not able to be fully > cleaned up by unregister_vlan_dev() which checks for vlan_id!=0. > > Also, VLAN 0 is probably not a valid number and it is kinda > "reserved" for HW accelerating devices, but it is probably too > late to reject it from creation even if makes sense. Instead, > just remove the check in unregister_vlan_dev(). > > Reported-by: Dmitry Vyukov > Fixes: ad1afb003939 ("vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)") > Cc: Vlad Yasevich > Cc: Ben Hutchings > Signed-off-by: Cong Wang Applied and queued up for -stable, thanks.