From 407583ee4f234ffaa8786b2c2255ad028c259b2e Mon Sep 17 00:00:00 2001 From: Rajith P R Date: Tue, 22 Feb 2022 18:26:51 +0530 Subject: fib: fix adj_get crash adj_get() crashed in worker thread. The index is valid but was freed. 0x00007fba5fb07921 in __GI_abort () at abort.c:79 0x00007fba528de7c3 in os_panic () at /development/libvpp/src/vpp/vnet/main.c:618 0x00007fba506f2a19 in debugger () at /development/libvpp/src/vppinfra/error.c:84 0x00007fba506f2797 in _clib_error (how_to_die=2, function_name=0x0, line_number=0, fmt=0x7fba521cecd9 "%s:%d (%s) assertion `%s' fails") at /development/libvpp/src/vppinfra/error.c:143 0x00007fba51d88254 in adj_get (adj_index=79) at /development/libvpp/src/vnet/adj/adj.h:472 0x00007fba51d87642 in icmp6_neighbor_solicitation_or_advertisement (vm=0x7fb9f19a0580, node=0x7fb9bb820340, frame=0x7fb9b718bc40, is_solicitation=0) at /development/libvpp/src/vnet/ip6-nd/ip6_nd.c:134 0x00007fba51d8f479 in icmp6_neighbor_advertisement (vm=0x7fb9f19a0580, node=0x7fb9bb820340, frame=0x7fb9b718bc40) at /development/libvpp/src/vnet/ip6-nd/ip6_nd.c:348 Type: fix Signed-off-by: Rajith P R Change-Id: Ibe29854137ee9680f7947450eb7e256b8c0ade31 --- src/vnet/adj/adj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c index 1345522c591..1f25870ea89 100644 --- a/src/vnet/adj/adj.c +++ b/src/vnet/adj/adj.c @@ -314,12 +314,12 @@ adj_last_lock_gone (ip_adjacency_t *adj) break; } - vlib_worker_thread_barrier_release(vm); fib_node_deinit(&adj->ia_node); ASSERT(0 == vec_len(adj->ia_delegates)); vec_free(adj->ia_delegates); pool_put(adj_pool, adj); + vlib_worker_thread_barrier_release(vm); } u32 -- cgit 1.2.3-korg