Netdev List
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@google.com>
To: sdf.kernel@gmail.com
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	 netdev@vger.kernel.org, pabeni@redhat.com
Subject: Re: [PATCH net-next v2 1/6] net: hold instance lock around NETDEV_DOWN/GOING_DOWN
Date: Tue, 14 Jul 2026 11:36:53 +0000	[thread overview]
Message-ID: <20260714113658.2023117-1-kuniyu@google.com> (raw)
In-Reply-To: <20260702224150.3730033-2-sdf@fomichev.me>

From: Stanislav Fomichev <sdf.kernel@gmail.com>
Date: Thu,  2 Jul 2026 15:41:45 -0700
> Mirror what call_netdevice_register_net_notifiers does but for the
> teardown. Cover only DOWN and GOING_DOWN. UNREGISTER is still unlocked
> because of the SW devices using dev_xxx methods.
> 
> Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
> ---
>  net/core/dev.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 4b3d5cfdf6e0..9d49493f4fb5 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -1912,9 +1912,11 @@ static void call_netdevice_unregister_notifiers(struct notifier_block *nb,
>  						struct net_device *dev)
>  {
>  	if (dev->flags & IFF_UP) {
> +		netdev_lock_ops(dev);
>  		call_netdevice_notifier(nb, NETDEV_GOING_DOWN,
>  					dev);
>  		call_netdevice_notifier(nb, NETDEV_DOWN, dev);

FYI, this is the report I mentioned yesterday.

Most likely false-positive because open/close, which takes RTNL,
are never called under epoll lock.

https://lore.kernel.org/netdev/6a55fc56.c90005c7.37d349.001c.GAE@google.com/

  reply	other threads:[~2026-07-14 11:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02 22:41 [PATCH net-next v2 0/6] net: hold instance lock around NETDEV_DOWN and NETDEV_GOING_DOWN Stanislav Fomichev
2026-07-02 22:41 ` [PATCH net-next v2 1/6] net: hold instance lock around NETDEV_DOWN/GOING_DOWN Stanislav Fomichev
2026-07-14 11:36   ` Kuniyuki Iwashima [this message]
2026-07-02 22:41 ` [PATCH net-next v2 2/6] net: dsa: hold instance lock on close-on-shutdown paths Stanislav Fomichev
2026-07-02 22:41 ` [PATCH net-next v2 3/6] net: mtk_eth_soc: hold instance lock around DMA-device-swap close Stanislav Fomichev
2026-07-02 22:41 ` [PATCH net-next v2 4/6] net: rtnetlink: take instance lock inside rtnl_configure_link Stanislav Fomichev
2026-07-02 22:41 ` [PATCH net-next v2 5/6] net: require instance lock for NETDEV_DOWN/GOING_DOWN notifiers Stanislav Fomichev
2026-07-02 22:41 ` [PATCH net-next v2 6/6] net: document NETDEV_UNREGISTER unlocked rationale Stanislav Fomichev
2026-07-07 13:40 ` [PATCH net-next v2 0/6] net: hold instance lock around NETDEV_DOWN and NETDEV_GOING_DOWN 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=20260714113658.2023117-1-kuniyu@google.com \
    --to=kuniyu@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf.kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox