Showing error 1599

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: kernel/sched_stats.h
Line in file: 71
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-29 20:11:37 UTC


Source:

 41                preempt_disable();
 42                for_each_domain(cpu, sd) {
 43                        enum cpu_idle_type itype;
 44
 45                        cpumask_scnprintf(mask_str, mask_len, sd->span);
 46                        seq_printf(seq, "domain%d %s", dcount++, mask_str);
 47                        for (itype = CPU_IDLE; itype < CPU_MAX_IDLE_TYPES;
 48                                        itype++) {
 49                                seq_printf(seq, " %u %u %u %u %u %u %u %u",
 50                                    sd->lb_count[itype],
 51                                    sd->lb_balanced[itype],
 52                                    sd->lb_failed[itype],
 53                                    sd->lb_imbalance[itype],
 54                                    sd->lb_gained[itype],
 55                                    sd->lb_hot_gained[itype],
 56                                    sd->lb_nobusyq[itype],
 57                                    sd->lb_nobusyg[itype]);
 58                        }
 59                        seq_printf(seq,
 60                                   " %u %u %u %u %u %u %u %u %u %u %u %u\n",
 61                            sd->alb_count, sd->alb_failed, sd->alb_pushed,
 62                            sd->sbe_count, sd->sbe_balanced, sd->sbe_pushed,
 63                            sd->sbf_count, sd->sbf_balanced, sd->sbf_pushed,
 64                            sd->ttwu_wake_remote, sd->ttwu_move_affine,
 65                            sd->ttwu_move_balance);
 66                }
 67                preempt_enable();
 68#endif
 69        }
 70        kfree(mask_str);
 71        return 0;
 72}
 73
 74static int schedstat_open(struct inode *inode, struct file *file)
 75{
 76        unsigned int size = PAGE_SIZE * (1 + num_online_cpus() / 32);
 77        char *buf = kmalloc(size, GFP_KERNEL);
 78        struct seq_file *m;
 79        int res;
 80
 81        if (!buf)
Show full sources