]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: thread/listeners: enable_listener must not call unbind_listener()
authorWilly Tarreau <w@1wt.eu>
Sun, 5 Nov 2017 10:38:44 +0000 (11:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 5 Nov 2017 10:38:44 +0000 (11:38 +0100)
commitbbd09b930678af71ca6a09d75a9941282d2ed613
treeea126926befd2870426bc319dcb2e3f59772c6b2
parent3340029b978126743f702ad3d967b42e026516af
BUG/MAJOR: thread/listeners: enable_listener must not call unbind_listener()

unbind_listener() takes the listener lock, which is already held by
enable_listener(). This situation happens when starting with nbproc > 1
with some bind lines limited to a certain process, because in this case
enable_listener() tries to stop unneeded listeners.

This commit introduces __do_unbind_listeners() which must be called with
the lock held, and makes enable_listener() use this one. Given that the
only return code has never been used and that it starts to make the code
more complicated to propagate it before throwing it to the trash, the
function's return type was changed to void.
include/proto/listener.h
src/listener.c