Showing error 982

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/ipv6/ip6mr.c
Line in file: 130
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

 100static struct inet6_protocol pim6_protocol;
 101#endif
 102
 103static struct timer_list ipmr_expire_timer;
 104
 105
 106#ifdef CONFIG_PROC_FS
 107
 108struct ipmr_mfc_iter {
 109        struct mfc6_cache **cache;
 110        int ct;
 111};
 112
 113
 114static struct mfc6_cache *ipmr_mfc_seq_idx(struct ipmr_mfc_iter *it, loff_t pos)
 115{
 116        struct mfc6_cache *mfc;
 117
 118        it->cache = mfc6_cache_array;
 119        read_lock(&mrt_lock);
 120        for (it->ct = 0; it->ct < ARRAY_SIZE(mfc6_cache_array); it->ct++)
 121                for (mfc = mfc6_cache_array[it->ct]; mfc; mfc = mfc->next)
 122                        if (pos-- == 0)
 123                                return mfc;
 124        read_unlock(&mrt_lock);
 125
 126        it->cache = &mfc_unres_queue;
 127        spin_lock_bh(&mfc_unres_lock);
 128        for (mfc = mfc_unres_queue; mfc; mfc = mfc->next)
 129                if (pos-- == 0)
 130                        return mfc;
 131        spin_unlock_bh(&mfc_unres_lock);
 132
 133        it->cache = NULL;
 134        return NULL;
 135}
 136
 137
 138
 139
 140/*
Show full sources