mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
BUG/MEDIUM: threads: Ignore current thread to end its harmless period
A previous patch was pushed to fix a deadlock when an isolated thread ends its harmless period (a9a9e9aac ["BUG/MEDIUM: thread: Fix a deadlock if an isolated thread is marked as harmless"]). But, unfortunately, the fix is incomplete. The same must be done in the outer loop, in thread_harmless_end() function. The current thread must be ignored when threads_want_rdv_mask mask is tested. This patch must also be backported as far as 2.0.
This commit is contained in:
parent
b5f0fac765
commit
f63a185500
@ -265,7 +265,7 @@ static inline void thread_harmless_end()
|
||||
{
|
||||
while (1) {
|
||||
HA_ATOMIC_AND(&threads_harmless_mask, ~tid_bit);
|
||||
if (likely((threads_want_rdv_mask & all_threads_mask) == 0))
|
||||
if (likely((threads_want_rdv_mask & ~tid_bit) == 0))
|
||||
break;
|
||||
thread_harmless_till_end();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user