Only reset accept_avail if we grabbed the lock.

Otherwise in certain scenarios it could mean that workers
unsuccessfully grabbed the lock, reset accept_avail and
no longer attempt to grab the lock afterwards.

This can cause a complete stall in workers processing requests.
This commit is contained in:
Joris Vink 2020-09-08 11:51:06 +02:00
parent 1d27558e39
commit 636469f555
1 changed files with 1 additions and 1 deletions

View File

@ -453,8 +453,8 @@ kore_worker_entry(struct kore_worker *kw)
}
if (!worker->has_lock && accept_avail) {
accept_avail = 0;
if (worker_acceptlock_obtain()) {
accept_avail = 0;
if (had_lock == 0) {
kore_platform_enable_accept();
had_lock = 1;