From d0c57d3d337c44003c5c1ae49ca6ee472695b5fb Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 18 Apr 2023 18:38:32 +0200 Subject: [PATCH] BUG/MEDIUM: stconn: Propagate error on the SC on sending path On sending path, a pending error can be promoted to a terminal error at the endpoint level (SE_FL_ERR_PENDING to SE_FL_ERROR). When this happens, we must propagate the error on the SC to be able to handle it at the stream level and eventually forward it to the other side. Because of this bug, it is possible to freeze sessions, for instance on the CLI. It is a 2.8-specific issue. No backport needed. --- src/stconn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stconn.c b/src/stconn.c index 0cfc4a7e3..59d2179ac 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -1664,6 +1664,8 @@ static int sc_conn_send(struct stconn *sc) if (sc_ep_test(sc, SE_FL_ERROR | SE_FL_ERR_PENDING)) { oc->flags |= CF_WRITE_EVENT; BUG_ON(sc_ep_test(sc, SE_FL_EOS|SE_FL_ERROR|SE_FL_ERR_PENDING) == (SE_FL_EOS|SE_FL_ERR_PENDING)); + if (sc_ep_test(sc, SE_FL_ERROR)) + sc->flags |= SC_FL_ERROR; return 1; }