mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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> |
||
|---|---|---|
| .. | ||
| hsr_debugfs.c | ||
| hsr_device.c | ||
| hsr_device.h | ||
| hsr_forward.c | ||
| hsr_forward.h | ||
| hsr_framereg.c | ||
| hsr_framereg.h | ||
| hsr_main.c | ||
| hsr_main.h | ||
| hsr_netlink.c | ||
| hsr_netlink.h | ||
| hsr_slave.c | ||
| hsr_slave.h | ||
| Kconfig | ||
| Makefile | ||
| prp_dup_discard_test.c | ||