Skip to content

Commit

Permalink
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Jul 19, 2014
2 parents cb20fd0 + b0ab99e commit d1743b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d1743b8

Please sign in to comment.