summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-07-19 18:26:43 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-07-19 18:26:43 +0200
commitd1743b810d7a306d1dd837e086d18124bc38b575 (patch)
tree30e33a166f2f501a1e6ac0be96c0636d98d16711 /kernel
parentMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/ker... (diff)
parentsched: Fix possible divide by zero in avg_atom() calculation (diff)
downloadlinux-d1743b810d7a306d1dd837e086d18124bc38b575.tar.xz
linux-d1743b810d7a306d1dd837e086d18124bc38b575.zip
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
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 695f9773bb60..627b3c34b821 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -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;