diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/tsacct.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/tsacct.c b/kernel/tsacct.c index 8ebcd8532df..5275fbae676 100644 --- a/kernel/tsacct.c +++ b/kernel/tsacct.c @@ -120,8 +120,10 @@ void acct_update_integrals(struct task_struct *tsk) if (likely(tsk->mm)) { cputime_t time, dtime; struct timeval value; + unsigned long flags; u64 delta; + local_irq_save(flags); time = tsk->stime + tsk->utime; dtime = cputime_sub(time, tsk->acct_timexpd); jiffies_to_timeval(cputime_to_jiffies(dtime), &value); @@ -129,10 +131,12 @@ void acct_update_integrals(struct task_struct *tsk) delta = delta * USEC_PER_SEC + value.tv_usec; if (delta == 0) - return; + goto out; tsk->acct_timexpd = time; tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm); tsk->acct_vm_mem1 += delta * tsk->mm->total_vm; + out: + local_irq_restore(flags); } } |