From: Christopher Faulet Date: Tue, 18 Nov 2025 10:51:58 +0000 (+0100) Subject: WIP/MEDIUM: stick-tables: Inc the session's ref_cnt when it is in the pend_updt list X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a1e55fe47e1e1150ad9a1f995738bbedf414772;p=thirdparty%2Fhaproxy.git WIP/MEDIUM: stick-tables: Inc the session's ref_cnt when it is in the pend_updt list --- 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);