netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taehee Yoo <ap420073@gmail.com>
To: davem@davemloft.net, kuba@kernel.org, dsahern@kernel.org,
	yoshfuji@linux-ipv6.org, netdev@vger.kernel.org,
	j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net,
	roopa@nvidia.com, nikolay@nvidia.com, ast@kernel.org,
	andriin@fb.com, daniel@iogearbox.net, weiwan@google.com,
	cong.wang@bytedance.com, bjorn@kernel.org,
	herbert@gondor.apana.org.au, bridge@lists.linux-foundation.org
Cc: ap420073@gmail.com
Subject: [PATCH net v2 0/2] net: fix lockdep false positive splat
Date: Sun, 25 Apr 2021 15:57:40 +0000	[thread overview]
Message-ID: <20210425155742.30057-1-ap420073@gmail.com> (raw)

This patchset is to fix lockdep false positive splat in multicast part of
the bridge.

When mdb or multicast config is changed, it acquires multicast_lock,
which is a per-interface(bridge) lock.
So, spin_lock_nested() should be used instead of spin_lock() because
interfaces can be recursive.
The spin_lock_nested() needs 'subclass' parameter.

The first patch adds a new helper function, which returns the nest_level
variable under RCU. The nest_level variable can be used as 'subclass'
parameter of spin_lock_nested().
The second patch fix lockdep false positive splat in the bridge multicast
part by using netdev_get_nest_level_rcu().

v2:
 - Remove dupliate Subject

Taehee Yoo (2):
  net: core: make bond_get_lowest_level_rcu() generic
  net: bridge: fix lockdep multicast_lock false positive splat

 drivers/net/bonding/bond_main.c |  45 +---------
 include/linux/netdevice.h       |   1 +
 net/bridge/br_mdb.c             |  12 +--
 net/bridge/br_multicast.c       | 146 ++++++++++++++++++++------------
 net/bridge/br_multicast_eht.c   |  18 ++--
 net/bridge/br_private.h         |  48 +++++++++++
 net/core/dev.c                  |  44 ++++++++++
 7 files changed, 204 insertions(+), 110 deletions(-)

-- 
2.17.1


             reply	other threads:[~2021-04-25 15:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25 15:57 Taehee Yoo [this message]
2021-04-25 15:57 ` [PATCH net v2 1/2] net: core: make bond_get_lowest_level_rcu() generic Taehee Yoo
2021-04-25 18:03   ` Heiner Kallweit
2021-04-26 15:24     ` Taehee Yoo
2021-04-25 15:57 ` [PATCH net 2/2] net: bridge: fix lockdep multicast_lock false positive splat Taehee Yoo
2021-04-25 16:45   ` Nikolay Aleksandrov
2021-04-26 12:48     ` Herbert Xu
2021-04-26 13:15       ` Nikolay Aleksandrov
2021-04-26 15:17         ` Taehee Yoo
2021-04-26 15:39           ` Nikolay Aleksandrov

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=20210425155742.30057-1-ap420073@gmail.com \
    --to=ap420073@gmail.com \
    --cc=andriin@fb.com \
    --cc=andy@greyhouse.net \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=bridge@lists.linux-foundation.org \
    --cc=cong.wang@bytedance.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=j.vosburgh@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@nvidia.com \
    --cc=vfalico@gmail.com \
    --cc=weiwan@google.com \
    --cc=yoshfuji@linux-ipv6.org \
    /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).