mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Use proper mutex locking when calling setrunnable from speedup_syncer().
Submitted by: Tor.Egge@fast.no
This commit is contained in:
parent
5d24b61a76
commit
0bf3b91d8a
2 changed files with 4 additions and 6 deletions
|
|
@ -1103,12 +1103,11 @@ sched_sync(void)
|
|||
int
|
||||
speedup_syncer()
|
||||
{
|
||||
int s;
|
||||
|
||||
s = splhigh();
|
||||
mtx_enter(&sched_lock, MTX_SPIN);
|
||||
if (updateproc->p_wchan == &lbolt)
|
||||
setrunnable(updateproc);
|
||||
splx(s);
|
||||
mtx_exit(&sched_lock, MTX_SPIN);
|
||||
if (rushjob < syncdelay / 2) {
|
||||
rushjob += 1;
|
||||
stat_rush_requests += 1;
|
||||
|
|
|
|||
|
|
@ -1103,12 +1103,11 @@ sched_sync(void)
|
|||
int
|
||||
speedup_syncer()
|
||||
{
|
||||
int s;
|
||||
|
||||
s = splhigh();
|
||||
mtx_enter(&sched_lock, MTX_SPIN);
|
||||
if (updateproc->p_wchan == &lbolt)
|
||||
setrunnable(updateproc);
|
||||
splx(s);
|
||||
mtx_exit(&sched_lock, MTX_SPIN);
|
||||
if (rushjob < syncdelay / 2) {
|
||||
rushjob += 1;
|
||||
stat_rush_requests += 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue