From 2a422e1d85218031a89d0bc9053b36ca5a64bbdc Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Thu, 24 Jul 2025 11:27:16 -0700 Subject: [PATCH] vcl: revert allow reads after transport cleanup Type: fix Fixes: 784410190eb96fa8dea9fa67a086aa0044fe9025 Change-Id: Iad0f083c4eceb9778f5dc8099c4a0da3fa230623 Signed-off-by: Florin Coras --- src/vcl/vppcom.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index ffa29bac34a..9da68c11c04 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -2129,12 +2129,9 @@ vppcom_session_read_internal (uint32_t session_handle, void *buf, int n, VDBG (0, "session %u[0x%llx] is not open! state 0x%x (%s)", s->session_index, s->vpp_handle, s->session_state, vcl_session_state_str (s->session_state)); - rx_fifo = vcl_session_is_ct (s) ? s->ct_rx_fifo : s->rx_fifo; - /* If application closed, e.g., mt app, or no data return error */ - if (s->session_state == VCL_STATE_CLOSED || - (s->flags & VCL_SESSION_F_APP_CLOSING) || - svm_fifo_is_empty_cons (rx_fifo)) - return vcl_session_closed_error (s); + /* We can't be sure vpp did not unmap the segment, so if the + * session is detached just return an error */ + return vcl_session_closed_error (s); } if (PREDICT_FALSE (s->flags & VCL_SESSION_F_RD_SHUTDOWN)) -- 2.16.6