Showing error 1532

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


Source:

 823                .compat_from_user = hashlimit_mt_compat_from_user,
 824                .compat_to_user        = hashlimit_mt_compat_to_user,
 825#endif
 826                .checkentry        = hashlimit_mt_check_v0,
 827                .destroy        = hashlimit_mt_destroy_v0,
 828                .me                = THIS_MODULE
 829        },
 830        {
 831                .name           = "hashlimit",
 832                .revision       = 1,
 833                .family         = NFPROTO_IPV6,
 834                .match          = hashlimit_mt,
 835                .matchsize      = sizeof(struct xt_hashlimit_mtinfo1),
 836                .checkentry     = hashlimit_mt_check,
 837                .destroy        = hashlimit_mt_destroy,
 838                .me             = THIS_MODULE,
 839        },
 840#endif
 841};
 842
 843/* PROC stuff */
 844static void *dl_seq_start(struct seq_file *s, loff_t *pos)
 845        __acquires(htable->lock)
 846{
 847        struct proc_dir_entry *pde = s->private;
 848        struct xt_hashlimit_htable *htable = pde->data;
 849        unsigned int *bucket;
 850
 851        spin_lock_bh(&htable->lock);
 852        if (*pos >= htable->cfg.size)
 853                return NULL;
 854
 855        bucket = kmalloc(sizeof(unsigned int), GFP_ATOMIC);
 856        if (!bucket)
 857                return ERR_PTR(-ENOMEM);
 858
 859        *bucket = *pos;
 860        return bucket;
 861}
 862
 863static void *dl_seq_next(struct seq_file *s, void *v, loff_t *pos)
Show full sources