sched: Fix possible divide by zero in avg_atom() calculation
[platform/adaptation/renesas_rcar/renesas_kernel.git] / kernel / sched / debug.c
index dd52e7f..183e8e5 100644 (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;