]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: pools: don't mark the thread harmless if already isolated
authorWilly Tarreau <w@1wt.eu>
Thu, 8 Aug 2019 05:38:19 +0000 (07:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Aug 2019 05:41:52 +0000 (07:41 +0200)
commit229e739c21e96dd2020f6351fcc10546a1848b50
treee77f27827db976e3b95b475663df81b81c4b1f84
parentc9858010c2b2b97ff3652baeeb52f6bc17b27cb7
BUG/MINOR: pools: don't mark the thread harmless if already isolated

Commit 85b2cae63 ("MINOR: pools: make the thread harmless during the
mmap/munmap syscalls") was used to relax the pressure experienced by
other threads when running in debug mode with UAF enabled. It places
a pair of thread_harmless_now()/thread_harmless_end() around the call
to mmap(), assuming callers are not sensitive to parallel activity.
But there are a few cases like "show sess all" where this happens in
isolated threads, and marking the thread as harmless there is a very
bad idea, even worse when arriving to thread_harmless_end() which loops
forever.

Let's only do that when the thread is not isolated. No backport is
needed as the patch above was only in 2.1-dev.
include/common/memory.h