]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Ensure that changes to dg_update_list are protected by mutex
authorDonald Sharp <sharpd@nvidia.com>
Thu, 16 Jan 2025 16:17:11 +0000 (11:17 -0500)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Thu, 6 Feb 2025 16:16:49 +0000 (16:16 +0000)
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>
(cherry picked from commit 19af3f3d7af0f8904794dae3c36f60ed1d5a3cc8)

zebra/zebra_dplane.c

index 9acdb4b2f8c60c62ceaba23c92ba5664d0902c6c..9c252cc63ceafebd6253b51c1b3913a3681f6348 100644 (file)
@@ -7703,7 +7703,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;