All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] vlan: fix a netdev refcnt leak for QinQ
@ 2022-02-09  8:19 Xin Long
  2022-02-09  8:19 ` [PATCH net 1/2] vlan: introduce vlan_dev_free_egress_priority Xin Long
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Xin Long @ 2022-02-09  8:19 UTC (permalink / raw)
  To: network dev; +Cc: davem, kuba, Eric Dumazet, Ziyang Xuan

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(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-02-11 22:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09  8:19 [PATCH net 0/2] vlan: fix a netdev refcnt leak for QinQ Xin Long
2022-02-09  8:19 ` [PATCH net 1/2] vlan: introduce vlan_dev_free_egress_priority Xin Long
2022-02-09  8:19 ` [PATCH net 2/2] vlan: move dev_put into vlan_dev_uninit Xin Long
2022-02-10  1:55   ` Jakub Kicinski
2022-02-10  3:40     ` Xin Long
2022-02-10  5:28       ` Jakub Kicinski
2022-02-10  5:49         ` Eric Dumazet
2022-02-10  5:59           ` Jakub Kicinski
2022-02-11  7:58             ` Xin Long
2022-02-11 22:06               ` Jakub Kicinski
2022-02-10  6:10           ` Eric Dumazet
2022-02-09 13:40 ` [PATCH net 0/2] vlan: fix a netdev refcnt leak for QinQ patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.