From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>,
Nikolay Aleksandrov <razor@blackwall.org>,
Ido Schimmel <idosch@nvidia.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
Eric Dumazet <edumazet@google.com>
Subject: [PATCH v2 net-next 0/5] net: bridge: take care of p->flags accesses
Date: Wed, 10 Jun 2026 16:18:31 +0000 [thread overview]
Message-ID: <20260610161836.1275531-1-edumazet@google.com> (raw)
(struct net_bridge_port)->flags can be read/written locklessly,
and thus can fire KCSAN warnings, or real bugs.
Prefer atomic operations (test_bit(), clear_bit(), set_bit())
and use READ_ONCE() for the remaining uses.
v2: addressed Nikolay's feedback on patches 3 & 4.
Eric Dumazet (5):
bridge: use atomic ops to read/change p->flags in sysfs
bridge: use atomic ops to read/change p->flags in br_netlink.c
net: bridge: use atomic ops to read/change p->flags (I)
net: bridge: use atomic ops to read/change p->flags (II)
net: bridge: use atomic ops to read/change p->flags (III)
net/bridge/br_arp_nd_proxy.c | 22 +++-----
net/bridge/br_fdb.c | 2 +-
net/bridge/br_forward.c | 15 +++---
net/bridge/br_if.c | 2 +-
net/bridge/br_input.c | 12 ++---
net/bridge/br_mrp.c | 20 ++++----
net/bridge/br_mrp_netlink.c | 8 +--
net/bridge/br_multicast.c | 5 +-
net/bridge/br_netlink.c | 99 +++++++++++++++++++-----------------
net/bridge/br_stp.c | 4 +-
net/bridge/br_stp_bpdu.c | 2 +-
net/bridge/br_switchdev.c | 8 +--
net/bridge/br_sysfs_if.c | 61 ++++++++++++----------
net/bridge/br_vlan_options.c | 2 +-
14 files changed, 134 insertions(+), 128 deletions(-)
--
2.54.0.1099.g489fc7bff1-goog
next reply other threads:[~2026-06-10 16:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 16:18 Eric Dumazet [this message]
2026-06-10 16:18 ` [PATCH v2 net-next 1/5] bridge: use atomic ops to read/change p->flags in sysfs Eric Dumazet
2026-06-11 4:46 ` Nikolay Aleksandrov
2026-06-11 18:11 ` Jakub Kicinski
2026-06-10 16:18 ` [PATCH v2 net-next 2/5] bridge: use atomic ops to read/change p->flags in br_netlink.c Eric Dumazet
2026-06-11 4:47 ` Nikolay Aleksandrov
2026-06-11 18:30 ` Jakub Kicinski
2026-06-11 20:01 ` Eric Dumazet
2026-06-10 16:18 ` [PATCH v2 net-next 3/5] net: bridge: use atomic ops to read/change p->flags (I) Eric Dumazet
2026-06-11 4:47 ` Nikolay Aleksandrov
2026-06-10 16:18 ` [PATCH v2 net-next 4/5] net: bridge: use atomic ops to read/change p->flags (II) Eric Dumazet
2026-06-11 4:47 ` Nikolay Aleksandrov
2026-06-10 16:18 ` [PATCH v2 net-next 5/5] net: bridge: use atomic ops to read/change p->flags (III) Eric Dumazet
2026-06-11 4:48 ` 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=20260610161836.1275531-1-edumazet@google.com \
--to=edumazet@google.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.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