Showing error 1144

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: 3903
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-29 14:49:11 UTC


Source:

3873static void rebalance_domains(int cpu, enum cpu_idle_type idle)
3874{
3875        int balance = 1;
3876        struct rq *rq = cpu_rq(cpu);
3877        unsigned long interval;
3878        struct sched_domain *sd;
3879        /* Earliest time when we have to do rebalance again */
3880        unsigned long next_balance = jiffies + 60*HZ;
3881        int update_next_balance = 0;
3882        int need_serialize;
3883        cpumask_t tmp;
3884
3885        for_each_domain(cpu, sd) {
3886                if (!(sd->flags & SD_LOAD_BALANCE))
3887                        continue;
3888
3889                interval = sd->balance_interval;
3890                if (idle != CPU_IDLE)
3891                        interval *= sd->busy_factor;
3892
3893                /* scale ms to jiffies */
3894                interval = msecs_to_jiffies(interval);
3895                if (unlikely(!interval))
3896                        interval = 1;
3897                if (interval > HZ*NR_CPUS/10)
3898                        interval = HZ*NR_CPUS/10;
3899
3900                need_serialize = sd->flags & SD_SERIALIZE;
3901
3902                if (need_serialize) {
3903                        if (!spin_trylock(&balancing))
3904                                goto out;
3905                }
3906
3907                if (time_after_eq(jiffies, sd->last_balance + interval)) {
3908                        if (load_balance(cpu, rq, sd, idle, &balance, &tmp)) {
3909                                /*
3910                                 * We've pulled tasks over so either we're no
3911                                 * longer idle, or one of our SMT siblings is
3912                                 * not idle.
3913                                 */
Show full sources