From c0737e962ca913763e4cc3aa516a2dfffe46659e Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 4 Mar 2019 14:19:39 -0800 Subject: session: use session index instead of fifo for evt Avoids derefrencing fifo pointers whose segments could have been unmapped. Change-Id: Ifb0b7399e424f145f3f94b769391a6f4e31bb4e6 Signed-off-by: Florin Coras --- src/vnet/session-apps/proxy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/vnet/session-apps/proxy.c') diff --git a/src/vnet/session-apps/proxy.c b/src/vnet/session-apps/proxy.c index 1ee5f5a741c..2e03ccc9f91 100644 --- a/src/vnet/session-apps/proxy.c +++ b/src/vnet/session-apps/proxy.c @@ -212,7 +212,8 @@ proxy_rx_callback (session_t * s) if (svm_fifo_set_event (active_open_tx_fifo)) { u32 ao_thread_index = active_open_tx_fifo->master_thread_index; - if (session_send_io_evt_to_thread_custom (active_open_tx_fifo, + u32 ao_session_index = active_open_tx_fifo->master_session_index; + if (session_send_io_evt_to_thread_custom (&ao_session_index, ao_thread_index, SESSION_IO_EVT_TX)) clib_warning ("failed to enqueue tx evt"); @@ -356,7 +357,8 @@ active_open_rx_callback (session_t * s) if (svm_fifo_set_event (proxy_tx_fifo)) { u8 thread_index = proxy_tx_fifo->master_thread_index; - return session_send_io_evt_to_thread_custom (proxy_tx_fifo, + u32 session_index = proxy_tx_fifo->master_session_index; + return session_send_io_evt_to_thread_custom (&session_index, thread_index, SESSION_IO_EVT_TX); } -- cgit 1.2.3-korg