summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-07-19 06:26:43 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2014-07-19 06:26:43 -1000
commitd1743b810d7a306d1dd837e086d18124bc38b575 (patch)
tree30e33a166f2f501a1e6ac0be96c0636d98d16711 /kernel
parentcb20fd0779add7c5b6dd7ca6f5e2aa2c0d06803f (diff)
parentb0ab99e7736af88b8ac1b7ae50ea287fffa2badc (diff)
downloadop-kernel-dev-d1743b810d7a306d1dd837e086d18124bc38b575.zip
op-kernel-dev-d1743b810d7a306d1dd837e086d18124bc38b575.tar.gz
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 695f977..627b3c3 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;
OpenPOWER on IntegriCloud