From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <edumazet@google.com>
Cc: <davem@davemloft.net>, <eric.dumazet@gmail.com>,
<kuba@kernel.org>, <kuniyu@amazon.com>, <netdev@vger.kernel.org>,
<pabeni@redhat.com>, <syzkaller@googlegroups.com>
Subject: Re: [PATCH net] net: add softirq safety to netdev_rename_lock
Date: Thu, 20 Jun 2024 12:01:14 -0700 [thread overview]
Message-ID: <20240620190114.49677-1-kuniyu@amazon.com> (raw)
In-Reply-To: <20240620133119.1135480-1-edumazet@google.com>
Date: Thu, 20 Jun 2024 13:31:19 +0000
From: Eric Dumazet <edumazet@google.com>
> syzbot reported a lockdep violation involving bridge driver [1]
>
> Make sure netdev_rename_lock is softirq safe to fix this issue.
>
> [1]
> WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
> 6.10.0-rc2-syzkaller-00249-gbe27b8965297 #0 Not tainted
> -----------------------------------------------------
> syz-executor.2/9449 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire:
> ffffffff8f5de668 (netdev_rename_lock.seqcount){+.+.}-{0:0}, at: rtnl_fill_ifinfo+0x38e/0x2270 net/core/rtnetlink.c:1839
>
> and this task is already holding:
> ffff888060c64cb8 (&br->lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
> ffff888060c64cb8 (&br->lock){+.-.}-{2:2}, at: br_port_slave_changelink+0x3d/0x150 net/bridge/br_netlink.c:1212
> which would create a new lock dependency:
> (&br->lock){+.-.}-{2:2} -> (netdev_rename_lock.seqcount){+.+.}-{0:0}
>
> but this new dependency connects a SOFTIRQ-irq-safe lock:
> (&br->lock){+.-.}-{2:2}
[...]
> Fixes: 0840556e5a3a ("net: Protect dev->name by seqlock.")
> Reported-by: syzbot <syzkaller@googlegroups.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Thanks!
next prev parent reply other threads:[~2024-06-20 19:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-20 13:31 [PATCH net] net: add softirq safety to netdev_rename_lock Eric Dumazet
2024-06-20 19:01 ` Kuniyuki Iwashima [this message]
2024-06-21 11:20 ` 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=20240620190114.49677-1-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzkaller@googlegroups.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).