From 45cd4bbe9c893a3cdaf26ab372aa5c1f29af6cda Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Fri, 7 Jun 2024 08:59:48 +0200 Subject: [PATCH] Fixed deferred route freeing crash The sending channel may be already gone when rte_free_deferred() is finally called so we have to log about route freeing in the synchronous call instead. --- nest/rt-table.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nest/rt-table.c b/nest/rt-table.c index b06b2cd1..421a5e92 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -558,6 +558,7 @@ rte_free(struct rte_storage *e, struct rtable_private *tab) if (!tab->rte_free_deferred++) rt_lock_table(tab); + rt_rte_trace_in(D_ROUTES, e->rte.sender->req, &e->rte, "freeing"); defer_call(&rfdi.dc, sizeof rfdi); } @@ -571,8 +572,6 @@ rte_free_deferred(struct deferred_call *dc) /* No need for synchronize_rcu, implied by the deferred_call */ - rt_rte_trace_in(D_ROUTES, e->rte.sender->req, &e->rte, "freeing"); - struct netindex *i = RTE_GET_NETINDEX(&e->rte); net_unlock_index(tab->netindex, i);