Skip to content

Commit

Permalink
zebra: Ensure that changes to dg_update_list are protected by mutex
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
donaldsharp committed Jan 16, 2025
1 parent 7b57492 commit c891ba3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zebra/zebra_dplane.c
Original file line number Diff line number Diff line change
Expand Up @@ -7698,7 +7698,9 @@ 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;
Expand Down

0 comments on commit c891ba3

Please sign in to comment.