]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vxlan: Add RCU read-side critical sections in the Tx path
authorIdo Schimmel <idosch@nvidia.com>
Tue, 15 Apr 2025 12:11:29 +0000 (15:11 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 22 Apr 2025 09:11:15 +0000 (11:11 +0200)
commit804b09be09f8af4eda5346a72361459ba21fcf1b
tree3d6a6b11aafa4c176d305ea601439b8e0a95eb72
parent07e32237ed9d3f5815fb900dee9458b5f115a678
vxlan: Add RCU read-side critical sections in the Tx path

The Tx path does not run from an RCU read-side critical section which
makes the current lockless accesses to FDB entries invalid. As far as I
am aware, this has not been a problem in practice, but traces will be
generated once we transition the FDB lookup to rhashtable_lookup().

Add rcu_read_{lock,unlock}() around the handling of FDB entries in the
Tx path. Remove the RCU read-side critical section from vxlan_xmit_nh()
as now the function is always called from an RCU read-side critical
section.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20250415121143.345227-2-idosch@nvidia.com
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/vxlan/vxlan_core.c