linux/net/hsr
Eric Dumazet 9f8b888ced hsr: no longer rely on RTNL in hsr_fill_info()
hsr_fill_info() used hsr_port_get_hsr(), which walks hsr->ports
with hsr_for_each_port_rtnl(), forcing "ip link show" dumps to
hold RTNL.

hsr->ports is an RCU protected list: ports are added with
list_add_tail_rcu(), removed with list_del_rcu() and freed with
kfree_rcu(), and the data path already iterates over it with
hsr_for_each_port().

Add a local RCU variant of hsr_port_get_hsr() and use it from
hsr_fill_info() under rcu_read_lock().

The remaining fields (sup_multicast_addr, prot_version) are set
once at device creation. hsr->sequence_nr is now read with
READ_ONCE(), since the transmit paths increment it under
hsr->seqnr_lock only.

Also add missing const qualifiers.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260916132822.1791040-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-18 16:50:38 -07:00
..
hsr_debugfs.c saner replacement for debugfs_rename() 2025-01-15 13:14:37 +01:00
hsr_device.c hsr: annotate data-race around hsr->sequence_nr 2026-09-18 16:50:38 -07:00
hsr_device.h net: hsr: Provide RedBox support (HSR-SAN) 2024-04-26 12:04:43 +02:00
hsr_forward.c hsr: annotate data-race around hsr->sequence_nr 2026-09-18 16:50:38 -07:00
hsr_forward.h
hsr_framereg.c net: hsr: emit RedBox-MAC TLV in PRP RedBox supervision frames 2026-07-27 17:46:40 -07:00
hsr_framereg.h net: hsr: add PRP interlink (RedBox) datapath and duplicate discard 2026-07-27 17:46:40 -07:00
hsr_main.c net/hsr: update outdated comments 2026-02-27 17:24:58 -08:00
hsr_main.h net: hsr: emit RedBox-MAC TLV in PRP RedBox supervision frames 2026-07-27 17:46:40 -07:00
hsr_netlink.c hsr: no longer rely on RTNL in hsr_fill_info() 2026-09-18 16:50:38 -07:00
hsr_netlink.h
hsr_slave.c net: hsr: enable promiscuous mode on interlink port with fwd offload 2026-09-10 08:45:00 -07:00
hsr_slave.h
Kconfig net: hsr: Add KUnit test for PRP 2025-03-13 10:04:22 +01:00
Makefile net: hsr: Add KUnit test for PRP 2025-03-13 10:04:22 +01:00
prp_dup_discard_test.c hsr: Implement more robust duplicate discard for HSR 2026-02-10 12:02:29 +01:00