Merge branch 'vxlan-fix-npds-when-using-nexthop-objects'
authorJakub Kicinski <kuba@kernel.org>
Tue, 2 Sep 2025 23:56:07 +0000 (16:56 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 2 Sep 2025 23:57:00 +0000 (16:57 -0700)
commit41ec374bdece1f59f2511e8a3046bb6efa1ed48d
tree2e50492fd6e184b710416369aaced0eadefef0d8
parenta7195a3d67dace056af7ca65144a11874df79562
parent2c9fb925c2ccc6ee475134840cff6c6b73851730
Merge branch 'vxlan-fix-npds-when-using-nexthop-objects'

Ido Schimmel says:

====================
vxlan: Fix NPDs when using nexthop objects

With FDB nexthop groups, VXLAN FDB entries do not necessarily point to
a remote destination but rather to an FDB nexthop group. This means that
first_remote_{rcu,rtnl}() can return NULL and a few places in the driver
were not ready for that, resulting in NULL pointer dereferences.
Patches #1-#2 fix these NPDs.

Note that vxlan_fdb_find_uc() still dereferences the remote returned by
first_remote_rcu() without checking that it is not NULL, but this
function is only invoked by a single driver which vetoes the creation of
FDB nexthop groups. I will patch this in net-next to make the code less
fragile.

Patch #3 adds a selftests which exercises these code paths and tests
basic Tx functionality with FDB nexthop groups. I verified that the test
crashes the kernel without the first two patches.
====================

Link: https://patch.msgid.link/20250901065035.159644-1-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>