From: Willy Tarreau Date: Wed, 13 Mar 2019 13:03:28 +0000 (+0100) Subject: BUG/MEDIUM: list: fix incorrect pointer unlocking in LIST_DEL_LOCKED() X-Git-Tag: v2.0-dev2~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0cef35b097c89ff675e055186e71239e105eb01;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: list: fix incorrect pointer unlocking in LIST_DEL_LOCKED() Injecting on a saturated listener started to exhibit some deadlocks again between LIST_POP_LOCKED() and LIST_DEL_LOCKED(). Olivier found it was due to a leftover from a previous debugging session. This patch fixes it. This will have to be backported if the other LIST_*_LOCKED() patches are backported. --- diff --git a/include/common/mini-clist.h b/include/common/mini-clist.h index 074176a208..6088c41f73 100644 --- a/include/common/mini-clist.h +++ b/include/common/mini-clist.h @@ -263,7 +263,7 @@ struct cond_wordlist { n2 = HA_ATOMIC_XCHG(&n->p, LLIST_BUSY); \ if (n2 == LLIST_BUSY) { \ if (p2 != NULL) \ - p2->n = (el); \ + p->n = p2; \ (el)->p = p; \ (el)->n = n; \ __ha_barrier_store(); \