summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliuyacan <liuyacan@corp.netease.com>2021-07-14 15:53:01 +0800
committerFlorin Coras <florin.coras@gmail.com>2021-07-14 14:33:00 +0000
commit5cac2e819472e1723b65373f80bfd05e5cfc9996 (patch)
tree85eec099559db55db34745995cf08fba85f201ea
parent63e15818bbf05e5bb5ecde5af0e9eec7b1084fec (diff)
vcl:fix segfault when unshare NO_MQ session
Session in LISTEN_NO_MQ state has no vpp_evt_q.This would cause a segfault when vcl try to send msg to vpp. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I0d21831dbed148cd1b0ca7c083aeeef9e813ef2f
-rw-r--r--src/vcl/vcl_locked.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c
index e8f56c6c5fc..baacdd0a472 100644
--- a/src/vcl/vcl_locked.c
+++ b/src/vcl/vcl_locked.c
@@ -710,7 +710,8 @@ vls_unshare_session (vcl_locked_session_t * vls, vcl_worker_t * wrk)
* Check if we can change owner or close
*/
vls_shd->owner_wrk_index = vls_shd->workers_subscribed[0];
- vcl_send_session_worker_update (wrk, s, vls_shd->owner_wrk_index);
+ if (s->session_state != VCL_STATE_LISTEN_NO_MQ)
+ vcl_send_session_worker_update (wrk, s, vls_shd->owner_wrk_index);
/* XXX is this still needed? */
if (vec_len (vls_shd->workers_subscribed) > 1)