1
0
Fork 0

Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fix from Thomas Gleixner:
 "Prevent a possible divide by zero in the debugging code"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched: Fix possible divide by zero in avg_atom() calculation
hifive-unleashed-5.1
Linus Torvalds 2014-07-19 06:26:43 -10:00
commit d1743b810d
1 changed files with 1 additions and 1 deletions

View File

@ -608,7 +608,7 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
avg_atom = p->se.sum_exec_runtime;
if (nr_switches)
do_div(avg_atom, nr_switches);
avg_atom = div64_ul(avg_atom, nr_switches);
else
avg_atom = -1LL;