]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8e2c754c09a9e02029ae433fbcc9199d23091947
tree735fa70930e02744565c7791bd8e0bb3bda7f26a
parentac4b2b470ef2bf4ad67f3fbcc47ec21fb829011b
parente6a71f2f7d4c85c28ff984d7171739c89c3a409f
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>