mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-31 15:47:10 +00:00
BUG/MEDIUM: threads: fix thread_release() at the end of the rendez-vous point
There is a bug in this function used to release other threads. It leaves the current thread marked as harmless. If after this another thread does a thread_isolate(), but before the first one reaches poll(), the second thread will believe it's alone while it's not. This must be backported to 1.8 since the rendez-vous point was merged into 1.8.14.
This commit is contained in:
parent
e18db9e984
commit
a9c0252b2e
@ -88,12 +88,8 @@ void thread_isolate()
|
||||
*/
|
||||
void thread_release()
|
||||
{
|
||||
while (1) {
|
||||
HA_ATOMIC_AND(&threads_want_rdv_mask, ~tid_bit);
|
||||
if (!(threads_want_rdv_mask & all_threads_mask))
|
||||
break;
|
||||
thread_harmless_till_end();
|
||||
}
|
||||
HA_ATOMIC_AND(&threads_want_rdv_mask, ~tid_bit);
|
||||
thread_harmless_end();
|
||||
}
|
||||
|
||||
__attribute__((constructor))
|
||||
|
Loading…
Reference in New Issue
Block a user