Showing error 1528

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: net/netfilter/x_tables.c
Line in file: 891
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 861        .show        = xt_match_seq_show,
 862};
 863
 864static int xt_match_open(struct inode *inode, struct file *file)
 865{
 866        int ret;
 867
 868        ret = seq_open(file, &xt_match_seq_ops);
 869        if (!ret) {
 870                struct seq_file *seq = file->private_data;
 871
 872                seq->private = PDE(inode);
 873        }
 874        return ret;
 875}
 876
 877static const struct file_operations xt_match_ops = {
 878        .owner         = THIS_MODULE,
 879        .open         = xt_match_open,
 880        .read         = seq_read,
 881        .llseek         = seq_lseek,
 882        .release = seq_release,
 883};
 884
 885static void *xt_target_seq_start(struct seq_file *seq, loff_t *pos)
 886{
 887        struct proc_dir_entry *pde = (struct proc_dir_entry *)seq->private;
 888        u_int16_t af = (unsigned long)pde->data;
 889
 890        mutex_lock(&xt[af].mutex);
 891        return seq_list_start(&xt[af].target, *pos);
 892}
 893
 894static void *xt_target_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 895{
 896        struct proc_dir_entry *pde = (struct proc_dir_entry *)seq->private;
 897        u_int16_t af = (unsigned long)pde->data;
 898
 899        return seq_list_next(v, &xt[af].target, pos);
 900}
 901
Show full sources