Skip to contentSkip to conversation

scheduler updates for 3.16

GIT PULL Thomas Gleixner 1 participant 1 message Jul 19, 2014 Scheduler

lore
Share & tools
lore
#0 lore raw

Linus,

please pull the latest sched-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched-urgent-for-linus

Prevent a possible divide by zero in the debugging code.

Thanks,

tglx

------------------>
Mateusz Guzik (1):
sched: Fix possible divide by zero in avg_atom() calculation

 kernel/sched/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/debug.c +1 -1
index 695f977..627b3c3 100644
@@ -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;