Showing error 942

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: 268
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

 238        struct mfc6_cache *mfc = v;
 239        struct ipmr_mfc_iter *it = seq->private;
 240
 241        ++*pos;
 242
 243        if (v == SEQ_START_TOKEN)
 244                return ipmr_mfc_seq_idx(seq->private, 0);
 245
 246        if (mfc->next)
 247                return mfc->next;
 248
 249        if (it->cache == &mfc_unres_queue)
 250                goto end_of_list;
 251
 252        BUG_ON(it->cache != mfc6_cache_array);
 253
 254        while (++it->ct < ARRAY_SIZE(mfc6_cache_array)) {
 255                mfc = mfc6_cache_array[it->ct];
 256                if (mfc)
 257                        return mfc;
 258        }
 259
 260        /* exhausted cache_array, show unresolved */
 261        read_unlock(&mrt_lock);
 262        it->cache = &mfc_unres_queue;
 263        it->ct = 0;
 264
 265        spin_lock_bh(&mfc_unres_lock);
 266        mfc = mfc_unres_queue;
 267        if (mfc)
 268                return mfc;
 269
 270 end_of_list:
 271        spin_unlock_bh(&mfc_unres_lock);
 272        it->cache = NULL;
 273
 274        return NULL;
 275}
 276
 277static void ipmr_mfc_seq_stop(struct seq_file *seq, void *v)
 278{
Show full sources