Cast wallclock.tv_sec to uint64_t to avoid overflow in the calculation.
PR: kern/161552 Reviewed by: trasz Tested by: Nikos Vassiliadis MFC after: 1 week
This commit is contained in:
parent
6e310b206f
commit
59f513cd09
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=233126
@ -745,7 +745,8 @@ racctd(void)
|
||||
mtx_lock(&racct_lock);
|
||||
racct_set_locked(p, RACCT_CPU, runtime);
|
||||
racct_set_locked(p, RACCT_WALLCLOCK,
|
||||
wallclock.tv_sec * 1000000 + wallclock.tv_usec);
|
||||
(uint64_t)wallclock.tv_sec * 1000000 +
|
||||
wallclock.tv_usec);
|
||||
mtx_unlock(&racct_lock);
|
||||
PROC_UNLOCK(p);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user