]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Ensure that changes to dg_update_list are protected by mutex 17865/head
authorDonald Sharp <sharpd@nvidia.com>
Thu, 16 Jan 2025 16:17:11 +0000 (11:17 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 17 Jan 2025 15:16:48 +0000 (10:16 -0500)
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 <sharpd@nvidia.com>
zebra/zebra_dplane.c

index b57c930154dc89d7c07d86181b9ae753e68d53b2..548ea725584774b67b069b9ee33bfc37efa20d24 100644 (file)
@@ -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;