From 19af3f3d7af0f8904794dae3c36f60ed1d5a3cc8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 16 Jan 2025 11:17:11 -0500 Subject: [PATCH] zebra: Ensure that changes to dg_update_list are protected by mutex The dg_update_list access is controlled by the dg_mutex in all other locations. Let's just add a mutex usage around the initialization of the dg_update_list even if it's part of the startup, just to keep things consistent. Signed-off-by: Donald Sharp --- zebra/zebra_dplane.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index b57c930154..548ea72558 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -7698,7 +7698,10 @@ static void zebra_dplane_init_internal(void) dplane_prov_list_init(&zdplane_info.dg_providers); - dplane_ctx_list_init(&zdplane_info.dg_update_list); + frr_with_mutex (&zdplane_info.dg_mutex) { + dplane_ctx_list_init(&zdplane_info.dg_update_list); + } + zns_info_list_init(&zdplane_info.dg_zns_list); zdplane_info.dg_updates_per_cycle = DPLANE_DEFAULT_NEW_WORK;