From 6d781f612a8b4f536ddba0299fcf47c25d04346c Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 18 May 2022 14:24:43 +0200 Subject: [PATCH] BUG/MINOR: check: Reinit the buffer wait list at the end of a check The buffer wait list is used to deal with buffer allocation failure. But at the end of health-check, it must be reinitialized. There is no reason to reason to get a buffer between two health-check runs. And in fact, the associated flags, CHK_ST_IN_ALLOC and CHK_ST_OUT_ALLOC, are already cleared at the end of a health-check. This patch must be backported as far as 2.2. On the 2.2, MT_LIST_ADDED and MT_LIST_DEL must be used instead of LIST_INLIST and LIST_DEL_INIT. --- src/check.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/check.c b/src/check.c index d65850da9..2da39af4d 100644 --- a/src/check.c +++ b/src/check.c @@ -1232,6 +1232,10 @@ struct task *process_chk_conn(struct task *t, void *context, unsigned int state) check_notify_success(check); } } + + if (LIST_INLIST(&check->buf_wait.list)) + LIST_DEL_INIT(&check->buf_wait.list); + task_set_affinity(t, MAX_THREADS_MASK); check_release_buf(check, &check->bi); check_release_buf(check, &check->bo);