From: David S. Miller <davem@davemloft.net>
Date: Wed, 9 Feb 2022 13:33:39 +0000 (+0000)
Subject: Merge branch 'vlan-QinQ-leak-fix'
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3bed06e36994661a75bae6a289926e566b9b3c1a;p=linux.git

Merge branch 'vlan-QinQ-leak-fix'

Xin Long says:

====================
vlan: fix a netdev refcnt leak for QinQ

This issue can be simply reproduced by:

  # ip link add dummy0 type dummy
  # ip link add link dummy0 name dummy0.1 type vlan id 1
  # ip link add link dummy0.1 name dummy0.1.2 type vlan id 2
  # rmmod 8021q

 unregister_netdevice: waiting for dummy0.1 to become free. Usage count = 1

So as to fix it, adjust vlan_dev_uninit() in Patch 1/1 so that it won't
be called twice for the same device, then do the fix in vlan_dev_uninit()
in Patch 2/2.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
---

3bed06e36994661a75bae6a289926e566b9b3c1a