[SRU][B][PATCH 0/1] vrf: fix refcnt leak with vxlan slaves
luke.nowakowskikrijger at canonical.com
Mon Oct 4 18:37:07 UTC 2021
This is a backport request by Nicolas Dichtel <nicolas.dichtel at 6wind.com>
There are cases, where deleting a VRF device can hang waiting for the refcnt
to drop to 0, with the message:
unregister_netdevice: waiting for vrf1 to become free. Usage count = 1
This is fixed upstream with commit b87b04f5019e
("ipv4: Fix device used for dst_alloc with local routes"), included in linux
v5.13. The original patch, which has introduced the bug, is included in
Removed updates to tools/testing/selftests/net/fib_tests.sh as they do not
exist for bionic. Also changed the struct referenced in the patch from
fib_nh_common to fib_nh as well as the associated accesses to the
Reproduced the bug with the upstream test case which also is the test in
the original patch added to fib_tests.sh.
Confirmed that after the patch was applied the test case does not hang
and successfully removes VRF device.
Relatively straightforward in that it links a new dst to a vrf device
isntead of the loopback if there is a valid nexthop device.
David Ahern (1):
ipv4: Fix device used for dst_alloc with local routes
net/ipv4/route.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
More information about the kernel-team