Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG/MEDIUM: listener: Acquire proxy's lock in relax_listener() if nec…
…essary Listener functions must follow a common locking pattern: 1. Get the proxy's lock if necessary 2. Get the protocol's lock if necessary 3. Get the listener's lock if necessary We must take care to respect this order to avoid any ABBA issue. However, an issue was introduced in the commit bcad7e6 ("MINOR: listener: add relax_listener() function"). relax_listener() gets the lisener's lock and if resume_listener() is called, the proxy's lock is then acquired. So to fix the issue, the proxy's lock is first acquired in relax_listener(), if necessary. This patch should fix the issue haproxy#2222. It must be backported as far as 2.4 because the above commit is marked to be backported there. (cherry picked from commit ff1c803) Signed-off-by: Christopher Faulet <cfaulet@haproxy.com> (cherry picked from commit 6844af6) Signed-off-by: Christopher Faulet <cfaulet@haproxy.com> (cherry picked from commit 6859790) Signed-off-by: Christopher Faulet <cfaulet@haproxy.com> (cherry picked from commit fbc1119) Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
- Loading branch information