summaryrefslogtreecommitdiff
path: root/net/bridge/br_device.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2026-05-17 14:50:09 +0300
committerJakub Kicinski <kuba@kernel.org>2026-05-19 18:13:01 -0700
commitbcdfd9fb109e0c9d76c345b2346b6b75ed1f476d (patch)
treea6e656b674d3c41e925a04fec9c7976ad77518fb /net/bridge/br_device.c
parent65d6d1fa50933a056305ba3f743dfb9d74cead39 (diff)
bridge: Add missing READ_ONCE() annotations around FDB destination port
When roaming, the FDB destination port can change without holding the bridge's hash lock. Therefore, add missing READ_ONCE() annotations in both RCU readers and readers that hold the lock. In the latter case, the annotation is not needed in places where the FDB entry was already validated to be a local entry since such entries cannot roam. Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20260517115009.175163-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r--net/bridge/br_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index a35ceae0a6f2..e7f343ab22d3 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -107,7 +107,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
else
br_flood(br, skb, BR_PKT_MULTICAST, false, true, vid);
} else if ((dst = br_fdb_find_rcu(br, dest, vid)) != NULL) {
- br_forward(dst->dst, skb, false, true);
+ br_forward(READ_ONCE(dst->dst), skb, false, true);
} else {
br_flood(br, skb, BR_PKT_UNICAST, false, true, vid);
}