mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
BUG/MEDIUM: applets: Don't use task_in_rq().
When deciding if we want to wake the task of an applet up, don't give up if task_in_rq returns 1, as there's a race condition and another thread may run it. Instead, always attempt to task_wakeup(), at worst the task is already in the run queue, and nothing will happen.
This commit is contained in:
parent
0c7a4b6371
commit
51205a1958
@ -1468,9 +1468,8 @@ void si_applet_wake_cb(struct stream_interface *si)
|
||||
* appctx but in the case the task is not in runqueue we may have to
|
||||
* wakeup the appctx immediately.
|
||||
*/
|
||||
if (!task_in_rq(si_task(si)) &&
|
||||
((si_rx_endp_ready(si) && !si_rx_blocked(si)) ||
|
||||
(si_tx_endp_ready(si) && !si_tx_blocked(si))))
|
||||
if ((si_rx_endp_ready(si) && !si_rx_blocked(si)) ||
|
||||
(si_tx_endp_ready(si) && !si_tx_blocked(si)))
|
||||
appctx_wakeup(si_appctx(si));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user