Showing error 917

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: kernel/sched.c
Line in file: 9319
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-02-27 21:22:42 UTC


Source:

9289                return ERR_PTR(-ENOMEM);
9290        }
9291
9292        return &ca->css;
9293}
9294
9295/* destroy an existing cpu accounting group */
9296static void
9297cpuacct_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp)
9298{
9299        struct cpuacct *ca = cgroup_ca(cgrp);
9300
9301        free_percpu(ca->cpuusage);
9302        kfree(ca);
9303}
9304
9305/* return total cpu usage (in nanoseconds) of a group */
9306static u64 cpuusage_read(struct cgroup *cgrp, struct cftype *cft)
9307{
9308        struct cpuacct *ca = cgroup_ca(cgrp);
9309        u64 totalcpuusage = 0;
9310        int i;
9311
9312        for_each_possible_cpu(i) {
9313                u64 *cpuusage = percpu_ptr(ca->cpuusage, i);
9314
9315                /*
9316                 * Take rq->lock to make 64-bit addition safe on 32-bit
9317                 * platforms.
9318                 */
9319                spin_lock_irq(&cpu_rq(i)->lock);
9320                totalcpuusage += *cpuusage;
9321                spin_unlock_irq(&cpu_rq(i)->lock);
9322        }
9323
9324        return totalcpuusage;
9325}
9326
9327static int cpuusage_write(struct cgroup *cgrp, struct cftype *cftype,
9328                                                                u64 reset)
9329{
Show full sources