mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Correct a bug that prevented deadlkres from (almost) ever firing.
deadlkres was using a reversed test to check whether ticks had rolled over. This meant that deadlkres could only fire after ticks had rolled over. This test was actually unnecessary as deadlkres only ever took the difference of ticks values which is safe even in the presence of ticks rollover. Remove the tests entirely. Now deadlkres will properly fire after a lock has been held after the timeout period. MFC after: 1 month
This commit is contained in:
parent
2df0539200
commit
4a7d0bfcaa
1 changed files with 2 additions and 8 deletions
|
|
@ -216,13 +216,8 @@ deadlkres(void)
|
|||
}
|
||||
FOREACH_THREAD_IN_PROC(p, td) {
|
||||
|
||||
/*
|
||||
* Once a thread is found in "interesting"
|
||||
* state a possible ticks wrap-up needs to be
|
||||
* checked.
|
||||
*/
|
||||
thread_lock(td);
|
||||
if (TD_ON_LOCK(td) && ticks < td->td_blktick) {
|
||||
if (TD_ON_LOCK(td)) {
|
||||
|
||||
/*
|
||||
* The thread should be blocked on a
|
||||
|
|
@ -247,8 +242,7 @@ deadlkres(void)
|
|||
__func__, td, tticks);
|
||||
}
|
||||
} else if (TD_IS_SLEEPING(td) &&
|
||||
TD_ON_SLEEPQ(td) &&
|
||||
ticks < td->td_blktick) {
|
||||
TD_ON_SLEEPQ(td)) {
|
||||
|
||||
/*
|
||||
* Check if the thread is sleeping on a
|
||||
|
|
|
|||
Loading…
Reference in a new issue