mbox series

[net,0/2] vlan: fix a netdev refcnt leak for QinQ

Message ID cover.1644394642.git.lucien.xin@gmail.com (mailing list archive)
Headers show
Series vlan: fix a netdev refcnt leak for QinQ | expand

Message

Xin Long Feb. 9, 2022, 8:19 a.m. UTC
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.

Xin Long (2):
  vlan: introduce vlan_dev_free_egress_priority
  vlan: move dev_put into vlan_dev_uninit

 net/8021q/vlan.h         |  2 +-
 net/8021q/vlan_dev.c     | 15 +++++++++++----
 net/8021q/vlan_netlink.c |  7 ++++---
 3 files changed, 16 insertions(+), 8 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 9, 2022, 1:40 p.m. UTC | #1
Hello:

This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Wed,  9 Feb 2022 03:19:54 -0500 you wrote:
> 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
> 
> [...]

Here is the summary with links:
  - [net,1/2] vlan: introduce vlan_dev_free_egress_priority
    https://git.kernel.org/netdev/net/c/37aa50c539bc
  - [net,2/2] vlan: move dev_put into vlan_dev_uninit
    https://git.kernel.org/netdev/net/c/d6ff94afd90b

You are awesome, thank you!