Showing error 1072

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/ipv4/igmp.c
Line in file: 2492
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Stanse (1.2)
Entered: 2012-03-04 17:07:06 UTC


Source:

2462static struct ip_sf_list *igmp_mcf_get_next(struct seq_file *seq, struct ip_sf_list *psf)
2463{
2464        struct igmp_mcf_iter_state *state = igmp_mcf_seq_private(seq);
2465
2466        psf = psf->sf_next;
2467        while (!psf) {
2468                spin_unlock_bh(&state->im->lock);
2469                state->im = state->im->next;
2470                while (!state->im) {
2471                        if (likely(state->idev != NULL)) {
2472                                read_unlock(&state->idev->mc_list_lock);
2473                                in_dev_put(state->idev);
2474                        }
2475                        state->dev = next_net_device(state->dev);
2476                        if (!state->dev) {
2477                                state->idev = NULL;
2478                                goto out;
2479                        }
2480                        state->idev = in_dev_get(state->dev);
2481                        if (!state->idev)
2482                                continue;
2483                        read_lock(&state->idev->mc_list_lock);
2484                        state->im = state->idev->mc_list;
2485                }
2486                if (!state->im)
2487                        break;
2488                spin_lock_bh(&state->im->lock);
2489                psf = state->im->sources;
2490        }
2491out:
2492        return psf;
2493}
2494
2495static struct ip_sf_list *igmp_mcf_get_idx(struct seq_file *seq, loff_t pos)
2496{
2497        struct ip_sf_list *psf = igmp_mcf_get_first(seq);
2498        if (psf)
2499                while (pos && (psf = igmp_mcf_get_next(seq, psf)) != NULL)
2500                        --pos;
2501        return pos ? NULL : psf;
2502}
Show full sources