Merge branch 'vlan-lockless-vlan_fill_info'

Eric Dumazet says:

====================
vlan: lockless vlan_fill_info()

vlan_fill_info() currently relies on RTNL being held, because it
uses rcu_dereference_rtnl() to walk vlan->egress_priority_map[].

While auditing the fields exposed there, it appears that
vlan->flags, vlan->ingress_priority_map[] and vlan->nr_*_mappings
are written under RTNL but already read from lockless contexts
(RX, TX, /proc/net/vlan/<dev> and vlan_get_size()).

- Patch 1 adds the missing READ_ONCE()/WRITE_ONCE() annotations.

- Patch 2 converts vlan_fill_info() to RCU.

vlan->egress_priority_map[] needed no work: it is already updated
with rcu_assign_pointer() and freed with kfree_rcu().

This is part of a larger effort to remove the RTNL dependency from
rtnl_link_ops->fill_info().
====================

Link: https://patch.msgid.link/20260916132532.1785657-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2026-09-18 16:50:17 -07:00
commit 4090fcee93
5 changed files with 65 additions and 46 deletions