summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-09-05 12:30:35 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2018-09-06 11:19:33 +0000
commit483a54b8d0886ed9f5f97b0b377d7adb4c810f29 (patch)
tree6efa55ed2bcf9372bf483614da0bed83cacb95c2 /src
parent145987776f57de20e9724d58fe28796d40ffebfa (diff)
acl-plugin: VPP-1400: fix crash when removing a session entry
bihash deletion operation may in turn do underlying memory operations, so ensure it is using the correct (private) heap. Change-Id: Ibef7ad7f9db6fa83da02316bf7509072ce579bc0 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit f74b4d2b559b1d5697fd625d9c8e0f76ba5a4463)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/acl/session_inlines.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/acl/session_inlines.h b/src/plugins/acl/session_inlines.h
index 0d7c1e4ace7..93683c4c4a1 100644
--- a/src/plugins/acl/session_inlines.h
+++ b/src/plugins/acl/session_inlines.h
@@ -394,6 +394,7 @@ acl_fa_deactivate_session (acl_main_t * am, u32 sw_if_index,
fa_session_t *sess =
get_session_ptr (am, sess_id.thread_index, sess_id.session_index);
ASSERT (sess->thread_index == os_get_thread_index ());
+ void *oldheap = clib_mem_set_heap (am->acl_mheap);
if (sess->is_ip6)
{
clib_bihash_add_del_40_8 (&am->fa_ip6_sessions_hash,
@@ -409,6 +410,7 @@ acl_fa_deactivate_session (acl_main_t * am, u32 sw_if_index,
sess->deleted = 1;
clib_smp_atomic_add (&am->fa_session_total_deactivations, 1);
+ clib_mem_set_heap (oldheap);
}
always_inline void