mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-09 21:07:43 +00:00
BUG/MEDIUM: list: fix the rollback on addq in the locked liss
Commit a8434ec14
("MINOR: lists: Implement locked variations.")
introduced locked lists which use the elements pointers as locks
for concurrent operations. A copy-paste typo in LIST_ADDQ_LOCKED()
causes corruption in the list in case the next pointer is already
held, as it restores the previous pointer into the next one. It
may impact the server pools.
This will have to be backported if the commit above is backported.
This commit is contained in:
parent
18215cba6a
commit
bd20ad5874
@ -208,7 +208,7 @@ struct cond_wordlist {
|
|||||||
__ha_barrier_store(); \
|
__ha_barrier_store(); \
|
||||||
n = HA_ATOMIC_XCHG(&p->n, LLIST_BUSY); \
|
n = HA_ATOMIC_XCHG(&p->n, LLIST_BUSY); \
|
||||||
if (n == LLIST_BUSY) { \
|
if (n == LLIST_BUSY) { \
|
||||||
(lh)->n = p; \
|
(lh)->p = p; \
|
||||||
__ha_barrier_store(); \
|
__ha_barrier_store(); \
|
||||||
continue; \
|
continue; \
|
||||||
} \
|
} \
|
||||||
|
Loading…
Reference in New Issue
Block a user