netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xin Long <lucien.xin@gmail.com>
To: network dev <netdev@vger.kernel.org>
Cc: davem@davemloft.net, kuba@kernel.org,
	Eric Dumazet <edumazet@google.com>,
	Ziyang Xuan <william.xuanziyang@huawei.com>
Subject: [PATCH net 0/2] vlan: fix a netdev refcnt leak for QinQ
Date: Wed,  9 Feb 2022 03:19:54 -0500	[thread overview]
Message-ID: <cover.1644394642.git.lucien.xin@gmail.com> (raw)

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


             reply	other threads:[~2022-02-09  8:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09  8:19 Xin Long [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1644394642.git.lucien.xin@gmail.com \
    --to=lucien.xin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=william.xuanziyang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).