summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-01-30 06:00:19 -0800
committerDamjan Marion <dmarion@me.com>2019-01-30 19:47:36 +0000
commit13b2ba2ad5527c8185dce368993a3877e7daf7a2 (patch)
tree44e47257a4b6561d5b9a56880e68b8da91754b50 /src/plugins
parent910d3694e8b22c9d14e5f2913d14ae149e184620 (diff)
MPLS tunnel; fix crash when deleting non-existant path
in the case the tunnel is the only user of the shared path list then removing its dependency removes the path list. hence lock the list Change-Id: I18318441698ceac16715b1826266a7d19dcd76e1 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/abf/abf_policy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/abf/abf_policy.c b/src/plugins/abf/abf_policy.c
index 1fde97f4c50..c411f3bae62 100644
--- a/src/plugins/abf/abf_policy.c
+++ b/src/plugins/abf/abf_policy.c
@@ -198,6 +198,7 @@ abf_policy_delete (u32 policy_id, const fib_route_path_t * rpaths)
ap = abf_policy_get (api);
old_pl = ap->ap_pl;
+ fib_path_list_lock (old_pl);
ap->ap_pl =
fib_path_list_copy_and_path_remove (ap->ap_pl,
(FIB_PATH_LIST_FLAG_SHARED |
@@ -227,6 +228,7 @@ abf_policy_delete (u32 policy_id, const fib_route_path_t * rpaths)
fib_walk_sync (abf_policy_fib_node_type, api, &ctx);
}
+ fib_path_list_unlock (old_pl);
}
return (0);