mirror of
https://github.com/opnsense/src.git
synced 2026-03-15 15:12:37 -04:00
In current code, threads performing an interruptible sleep will leave the waiters flag on forcing the owner to do a wakeup even when the waiter queue is empty. That operation may lead to a deadlock in the case of doing a fake wakeup on the "preferred" queue while the other queue has real waiters on it, because nobody is going to wakeup the 2nd queue waiters and they will sleep indefinitively. A similar bug, is present, for lockmgr in the case the waiters are sleeping with LK_SLEEPFAIL on. Add a sleepqueue interface which does report the actual number of waiters on a specified queue of a waitchannel and track if at least one sleepfail waiter is present or not. In presence of this or empty "preferred" queue, wakeup both waiters queues. Discussed with: kib Tested by: Pete French <petefrench at ticketswitch dot com>, Justin Head <justin at encarnate dot com> |
||
|---|---|---|
| .. | ||
| colldef | ||
| dict | ||
| doc | ||
| examples | ||
| info | ||
| man | ||
| me | ||
| misc | ||
| mk | ||
| mklocale | ||
| monetdef | ||
| msgdef | ||
| numericdef | ||
| security | ||
| sendmail | ||
| skel | ||
| snmp | ||
| syscons | ||
| tabset | ||
| termcap | ||
| timedef | ||
| zoneinfo | ||
| Makefile | ||
| Makefile.inc | ||