OSDN Git Service

Merge branch 'vlan-QinQ-leak-fix'
authorDavid S. Miller <davem@davemloft.net>
Wed, 9 Feb 2022 13:33:39 +0000 (13:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Feb 2022 13:33:39 +0000 (13:33 +0000)
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>

Trivial merge