Showing error 1529

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: 647
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 617}
 618EXPORT_SYMBOL(xt_free_table_info);
 619
 620/* Find table by name, grabs mutex & ref.  Returns ERR_PTR() on error. */
 621struct xt_table *xt_find_table_lock(struct net *net, u_int8_t af,
 622                                    const char *name)
 623{
 624        struct xt_table *t;
 625
 626        if (mutex_lock_interruptible(&xt[af].mutex) != 0)
 627                return ERR_PTR(-EINTR);
 628
 629        list_for_each_entry(t, &net->xt.tables[af], list)
 630                if (strcmp(t->name, name) == 0 && try_module_get(t->me))
 631                        return t;
 632        mutex_unlock(&xt[af].mutex);
 633        return NULL;
 634}
 635EXPORT_SYMBOL_GPL(xt_find_table_lock);
 636
 637void xt_table_unlock(struct xt_table *table)
 638{
 639        mutex_unlock(&xt[table->af].mutex);
 640}
 641EXPORT_SYMBOL_GPL(xt_table_unlock);
 642
 643#ifdef CONFIG_COMPAT
 644void xt_compat_lock(u_int8_t af)
 645{
 646        mutex_lock(&xt[af].compat_mutex);
 647}
 648EXPORT_SYMBOL_GPL(xt_compat_lock);
 649
 650void xt_compat_unlock(u_int8_t af)
 651{
 652        mutex_unlock(&xt[af].compat_mutex);
 653}
 654EXPORT_SYMBOL_GPL(xt_compat_unlock);
 655#endif
 656
 657struct xt_table_info *
Show full sources