]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:58:12 +0000 (18:58 +0200)
commit02bebe7d0483dc25a4ec230ab67d01433def7f00
treecd6905c66a5ad2a7b3bcbe94e0df856105c57e4c
parent9238419f6de35c2641e093ca8a3d25b5f5375dbb
vxlan: Add RCU read-side critical sections in the Tx path

[ Upstream commit 804b09be09f8af4eda5346a72361459ba21fcf1b ]

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>
Stable-dep-of: 1f5d2fd1ca04 ("vxlan: Fix NPD in {arp,neigh}_reduce() when using nexthop objects")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/vxlan/vxlan_core.c