All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xiyou.wangcong@gmail.com
Cc: netdev@vger.kernel.org,
	syzbot+f3a0e80c34b3fc28ac5e@syzkaller.appspotmail.com,
	ap420073@gmail.com, dvyukov@google.com
Subject: Re: [Patch net] net: change addr_list_lock back to static key
Date: Tue, 09 Jun 2020 13:00:48 -0700 (PDT)	[thread overview]
Message-ID: <20200609.130048.1344695073399682276.davem@davemloft.net> (raw)
In-Reply-To: <20200608215301.26772-1-xiyou.wangcong@gmail.com>

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Mon,  8 Jun 2020 14:53:01 -0700

> The dynamic key update for addr_list_lock still causes troubles,
> for example the following race condition still exists:
> 
> CPU 0:				CPU 1:
> (RCU read lock)			(RTNL lock)
> dev_mc_seq_show()		netdev_update_lockdep_key()
> 				  -> lockdep_unregister_key()
>  -> netif_addr_lock_bh()
> 
> because lockdep doesn't provide an API to update it atomically.
> Therefore, we have to move it back to static keys and use subclass
> for nest locking like before.
> 
> In commit 1a33e10e4a95 ("net: partially revert dynamic lockdep key
> changes"), I already reverted most parts of commit ab92d68fc22f
> ("net: core: add generic lockdep keys").
> 
> This patch reverts the rest and also part of commit f3b0a18bb6cb
> ("net: remove unnecessary variables and callback"). After this
> patch, addr_list_lock changes back to using static keys and
> subclasses to satisfy lockdep. Thanks to dev->lower_level, we do
> not have to change back to ->ndo_get_lock_subclass().
> 
> And hopefully this reduces some syzbot lockdep noises too.
> 
> Reported-by: syzbot+f3a0e80c34b3fc28ac5e@syzkaller.appspotmail.com
> Cc: Taehee Yoo <ap420073@gmail.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Ok, let's see how this goes.

Applied, thanks Cong.

  reply	other threads:[~2020-06-09 20:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 21:53 [Patch net] net: change addr_list_lock back to static key Cong Wang
2020-06-09 20:00 ` David Miller [this message]
2020-06-10 14:48 ` Taehee Yoo
2020-06-10 23:21   ` Cong Wang
2020-06-13 16:03     ` Taehee Yoo
2020-06-15 21:33       ` Cong Wang
2020-06-16 15:03         ` Taehee Yoo
2020-06-17 17:42           ` Cong Wang
2020-06-18 19:40 ` Vladimir Oltean
2020-06-18 19:56   ` Cong Wang
2020-06-18 20:06     ` Cong Wang
2020-06-18 20:33       ` Vladimir Oltean
2020-06-18 20:59         ` Cong Wang
2020-06-18 22:29         ` Andrew Lunn
2020-06-18 22:32           ` Vladimir Oltean
2020-06-18 22:46             ` Andrew Lunn
2020-06-18 22:53               ` Vladimir Oltean

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=20200609.130048.1344695073399682276.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ap420073@gmail.com \
    --cc=dvyukov@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+f3a0e80c34b3fc28ac5e@syzkaller.appspotmail.com \
    --cc=xiyou.wangcong@gmail.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 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.