BUG/MAJOR: dns: attempt to lock globaly for msg waiter list instead of use barrier

The barrier is insufficient here to protect the waiters list as we can
definitely catch situations where ds->waiter shows an inconsistency
whereby the element is not attached when entering the "if" block and
is already attached when attaching it later.

This patch uses a larger lock to maintain consistency. Without it the
code would crash in 30-180 minutes under heavy stress, always showing
the same problem (ds->waiter->n->p != &ds->waiter). Now it seems to
always resist, suggesting that this was indeed the problem.

This will have to be backported to 2.4.

(cherry picked from commit 7045590d8a0af9a16ab01e96340060b3bf9dd72c)
Signed-off-by: Willy Tarreau <w@1wt.eu>
1 file changed