Fix a panic that a priority value which is passed to cv_broadcastpri(9)
can be < 0. We don't ignore a `increment' argument but at least we keep a priority value of NDIS threads over PRI_MIN_KERN. Reviewed by: thompsa
This commit is contained in:
parent
e5861421aa
commit
32e9c9dc71
@ -1591,8 +1591,9 @@ ntoskrnl_waittest(obj, increment)
|
||||
}
|
||||
|
||||
if (satisfied == TRUE)
|
||||
cv_broadcastpri(&we->we_cv, w->wb_oldpri -
|
||||
(increment * 4));
|
||||
cv_broadcastpri(&we->we_cv,
|
||||
(w->wb_oldpri - (increment * 4)) > PRI_MIN_KERN ?
|
||||
w->wb_oldpri - (increment * 4) : PRI_MIN_KERN);
|
||||
|
||||
e = e->nle_flink;
|
||||
}
|
||||
@ -3384,8 +3385,9 @@ KeSetEvent(kevent, increment, kwait)
|
||||
}
|
||||
} else {
|
||||
w->wb_awakened |= TRUE;
|
||||
cv_broadcastpri(&we->we_cv, w->wb_oldpri -
|
||||
(increment * 4));
|
||||
cv_broadcastpri(&we->we_cv,
|
||||
(w->wb_oldpri - (increment * 4)) > PRI_MIN_KERN ?
|
||||
w->wb_oldpri - (increment * 4) : PRI_MIN_KERN);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user