BUG/MINOR: fd: properly wait for !running_mask in fd_set_running_excl()
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Feb 2021 18:40:49 +0000 (19:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Feb 2021 18:40:49 +0000 (19:40 +0100)
commit5926e384e62d6e47272062f1fbec235bd11cc517
tree4dc305d035ceaf9edf59fb9e888ca2eecefd1cd0
parent9c6dbf0eea7382665bdd9e53bd7e249962a40973
BUG/MINOR: fd: properly wait for !running_mask in fd_set_running_excl()

In fd_set_running_excl() we don't reset the old mask in the CAS loop,
so if we fail on the first round, we'll forcefully take the FD on the
next one.

In practice it's used bu fd_insert() and fd_delete() only, none of which
is supposed to be passed an FD which is still in use since in practice,
given that for now only listeners may be enabled on multiple threads at
once.

This can be backported to 2.2 but shouldn't result in fixing any user
visible bug for now.
include/haproxy/fd.h