mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
vlan: no longer rely on RTNL in vlan_fill_info()
vlan_fill_info() used rcu_dereference_rtnl() to walk the egress priority map, forcing "ip link show" dumps to hold RTNL. The egress priority map is already fully RCU compliant: entries are published with rcu_assign_pointer() and freed with kfree_rcu() from vlan_dev_set_egress_priority() and vlan_dev_free_egress_priority(). Wrap the QoS mapping serialization in rcu_read_lock() / rcu_read_unlock() and use rcu_dereference(). Now that all the involved fields are annotated, use READ_ONCE() for vlan->flags, vlan->nr_ingress_mappings, vlan->nr_egress_mappings and vlan->ingress_priority_map[]. Also add missing const qualifiers in vlan_get_size() and vlan_fill_info(). Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20260916132532.1785657-3-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
ca6ff8dd70
commit
ea5bd52c8b
1 changed files with 30 additions and 18 deletions
Loading…
Add table
Add a link
Reference in a new issue