aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_worker.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-03-04 14:19:39 -0800
committerFlorin Coras <florin.coras@gmail.com>2019-03-06 18:41:28 +0000
commitc0737e962ca913763e4cc3aa516a2dfffe46659e (patch)
tree195ab85ca0d12e6b2f8b9a73f7f8c5a46bd3bb13 /src/vnet/session/application_worker.c
parent2c49ffeb251d4eb11368ca8f866020e317ac09fb (diff)
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 <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application_worker.c')
-rw-r--r--src/vnet/session/application_worker.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/session/application_worker.c b/src/vnet/session/application_worker.c
index 7c888882093..85a6fede429 100644
--- a/src/vnet/session/application_worker.c
+++ b/src/vnet/session/application_worker.c
@@ -562,7 +562,7 @@ app_send_io_evt_rx (app_worker_t * app_wrk, session_t * s, u8 lock)
ASSERT (!svm_msg_q_msg_is_invalid (&msg));
evt = (session_event_t *) svm_msg_q_msg_data (mq, &msg);
- evt->fifo = s->rx_fifo;
+ evt->session_index = s->rx_fifo->client_session_index;
evt->event_type = SESSION_IO_EVT_RX;
(void) svm_fifo_set_event (s->rx_fifo);
@@ -599,7 +599,7 @@ app_send_io_evt_tx (app_worker_t * app_wrk, session_t * s, u8 lock)
evt = (session_event_t *) svm_msg_q_msg_data (mq, &msg);
evt->event_type = SESSION_IO_EVT_TX;
- evt->fifo = s->tx_fifo;
+ evt->session_index = s->tx_fifo->client_session_index;
return app_enqueue_evt (mq, &msg, lock);
}