linux/net/bridge
Nikolay Aleksandrov ee87c63f9b net: bridge: fix MST static key usage
As Ido pointed out, the static key usage in MST is buggy and should use
inc/dec instead of enable/disable because we can have multiple bridges
with MST enabled which means a single bridge can disable MST for all.
Use static_branch_inc/dec to avoid that. When destroying a bridge decrement
the key if MST was enabled.

Fixes: ec7328b591 ("net: bridge: mst: Multiple Spanning Tree (MST) mode")
Reported-by: Ido Schimmel <idosch@nvidia.com>
Closes: https://lore.kernel.org/netdev/20251104120313.1306566-1-razor@blackwall.org/T/#m6888d87658f94ed1725433940f4f4ebb00b5a68b
Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20251105111919.1499702-3-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-11-06 07:32:17 -08:00
..
netfilter netfilter: nft_meta_bridge: introduce NFT_META_BRI_IIFHWADDR support 2025-09-11 15:40:55 +02:00
Kconfig
Makefile
br.c net: bridge: Install FDB for bridge MAC on VLAN 0 2025-09-23 17:10:49 -07:00
br_arp_nd_proxy.c net: bridge: Prevent unicast ARP/NS packets from being suppressed by bridge 2025-04-09 19:13:43 -07:00
br_cfm.c net: replace use of system_wq with system_percpu_wq 2025-09-22 17:40:30 -07:00
br_cfm_netlink.c bridge: cfm: fix enum typo in br_cc_ccm_tx_parse 2023-12-26 22:38:13 +00:00
br_device.c net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
br_fdb.c net: bridge: Introduce UAPI for BR_BOOLOPT_FDB_LOCAL_VLAN_0 2025-09-11 19:02:50 -07:00
br_forward.c net: bridge: fix use-after-free due to MST port state bypass 2025-11-06 07:32:17 -08:00
br_if.c net: bridge: fix MST static key usage 2025-11-06 07:32:17 -08:00
br_input.c net: bridge: fix use-after-free due to MST port state bypass 2025-11-06 07:32:17 -08:00
br_ioctl.c net: Remove RTNL dance for SIOCBRADDIF and SIOCBRDELIF. 2025-03-21 22:10:06 +01:00
br_mdb.c net: bridge: mcast: Notify on mdb offload failure 2025-04-14 15:56:43 -07:00
br_mrp.c net: replace use of system_wq with system_percpu_wq 2025-09-22 17:40:30 -07:00
br_mrp_netlink.c
br_mrp_switchdev.c
br_mst.c net: bridge: fix MST static key usage 2025-11-06 07:32:17 -08:00
br_multicast.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-08-21 11:33:15 -07:00
br_multicast_eht.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
br_netfilter_hooks.c netfilter: br_netfilter: do not check confirmed bit in br_nf_local_in() after confirm 2025-08-27 11:53:37 +02:00
br_netfilter_ipv6.c netfilter: bridge: replace physindev with physinif in nf_bridge_info 2024-01-17 12:02:49 +01:00
br_netlink.c net: s/dev_get_flags/netif_get_flags/ 2025-07-18 17:27:47 -07:00
br_netlink_tunnel.c net: bridge: fix an inconsistent indentation 2024-06-05 10:04:47 +01:00
br_nf_core.c bridge: netfilter: Fix forwarding of fragmented packets 2025-05-16 16:02:06 -07:00
br_private.h net: bridge: fix MST static key usage 2025-11-06 07:32:17 -08:00
br_private_cfm.h
br_private_mcast_eht.h
br_private_mrp.h
br_private_stp.h
br_private_tunnel.h bridge: always declare tunnel functions 2023-05-17 21:28:58 -07:00
br_stp.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
br_stp_bpdu.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
br_stp_if.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
br_stp_timer.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
br_switchdev.c net: s/dev_get_port_parent_id/netif_get_port_parent_id/ 2025-07-18 17:27:46 -07:00
br_sysfs_br.c sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
br_sysfs_if.c
br_vlan.c bridge: br_vlan_fill_forward_path_pvid: use br_vlan_group_rcu() 2025-10-08 13:17:31 +02:00
br_vlan_options.c bridge: vlan: Allow setting VLAN neighbor suppression state 2023-04-21 08:25:50 +01:00
br_vlan_tunnel.c ip_tunnel: convert __be16 tunnel flags to bitmaps 2024-04-01 10:49:28 +01:00