mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Protect calcru() with sched_lock.
This commit is contained in:
parent
ef7b803dcd
commit
fb29c3e083
1 changed files with 2 additions and 0 deletions
|
|
@ -654,7 +654,9 @@ linux_times(struct proc *p, struct linux_times_args *args)
|
|||
#ifdef DEBUG
|
||||
printf("Linux-emul(%ld): times(*)\n", (long)p->p_pid);
|
||||
#endif
|
||||
mtx_enter(&sched_lock, MTX_SPIN);
|
||||
calcru(p, &ru.ru_utime, &ru.ru_stime, NULL);
|
||||
mtx_exit(&sched_lock, MTX_SPIN);
|
||||
|
||||
tms.tms_utime = CONVTCK(ru.ru_utime);
|
||||
tms.tms_stime = CONVTCK(ru.ru_stime);
|
||||
|
|
|
|||
Loading…
Reference in a new issue