]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/cpu.c
cputime: Use accessors to read task cputime stats
[karo-tx-linux.git] / kernel / cpu.c
index 3046a503242c8eb67f031d445713a9e55c986e73..e5d5e8e1e03048424c41cb17bff75d4e91a6f060 100644 (file)
@@ -224,11 +224,13 @@ void clear_tasks_mm_cpumask(int cpu)
 static inline void check_for_tasks(int cpu)
 {
        struct task_struct *p;
+       cputime_t utime, stime;
 
        write_lock_irq(&tasklist_lock);
        for_each_process(p) {
+               task_cputime(p, &utime, &stime);
                if (task_cpu(p) == cpu && p->state == TASK_RUNNING &&
-                   (p->utime || p->stime))
+                   (utime || stime))
                        printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d "
                                "(state = %ld, flags = %x)\n",
                                p->comm, task_pid_nr(p), cpu,