From 2a1e55fe47e1e1150ad9a1f995738bbedf414772 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 18 Nov 2025 11:51:58 +0100 Subject: [PATCH] WIP/MEDIUM: stick-tables: Inc the session's ref_cnt when it is in the pend_updt list --- src/stick_table.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stick_table.c b/src/stick_table.c index 5d0bd6c68..10f828ecf 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -642,8 +642,10 @@ void stktable_touch_with_exp(struct stktable *t, struct stksess *ts, int local, } - if (did_append) + if (did_append) { + HA_ATOMIC_INC(&ts->ref_cnt); tasklet_wakeup(t->updt_task); + } if (decrefcnt) HA_ATOMIC_DEC(&ts->ref_cnt); @@ -877,6 +879,7 @@ struct task *stktable_add_pend_updates(struct task *t, void *ctx, unsigned int s * it from the list, but before we inserted it into the tree */ MT_LIST_INIT(&stksess->pend_updts); + HA_ATOMIC_DEC(&stksess->ref_cnt); } HA_RWLOCK_WRUNLOCK(STK_TABLE_UPDT_LOCK, &table->updt_lock); -- 2.47.3