]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: queue: make sure pendconn->strm->pend_pos is always valid
authorWilly Tarreau <w@1wt.eu>
Thu, 26 Jul 2018 05:33:44 +0000 (07:33 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 26 Jul 2018 15:32:51 +0000 (17:32 +0200)
commitc1a60d6218af005f847da4ade4465012d439a7cd
tree7910836ee205e737cdccfb9442360cdc0c7e4f79
parent6bdd05c0ef6d7c3208f1a9f6d1cb7b6edc2b90ad
MINOR: queue: make sure pendconn->strm->pend_pos is always valid

pendconn_add() used to assign strm->pend_pos very late, after unlocking
the queue, so that a watching thread could see a random value in
pendconn->strm->pend_pos even while holding the lock on the element and
the queue itself. While there's currently nothing wrong with this, it
costs nothing to arrange it and will simplify code analysis later.
src/queue.c