Showing error 1488

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


Source:

2940try_again:
2941        if (ifa) {
2942                if (!net_eq(dev_net(ifa->idev->dev), net)) {
2943                        ifa = ifa->lst_next;
2944                        goto try_again;
2945                }
2946        }
2947
2948        if (!ifa && ++state->bucket < IN6_ADDR_HSIZE) {
2949                ifa = inet6_addr_lst[state->bucket];
2950                goto try_again;
2951        }
2952
2953        return ifa;
2954}
2955
2956static struct inet6_ifaddr *if6_get_idx(struct seq_file *seq, loff_t pos)
2957{
2958        struct inet6_ifaddr *ifa = if6_get_first(seq);
2959
2960        if (ifa)
2961                while(pos && (ifa = if6_get_next(seq, ifa)) != NULL)
2962                        --pos;
2963        return pos ? NULL : ifa;
2964}
2965
2966static void *if6_seq_start(struct seq_file *seq, loff_t *pos)
2967        __acquires(addrconf_hash_lock)
2968{
2969        read_lock_bh(&addrconf_hash_lock);
2970        return if6_get_idx(seq, *pos);
2971}
2972
2973static void *if6_seq_next(struct seq_file *seq, void *v, loff_t *pos)
2974{
2975        struct inet6_ifaddr *ifa;
2976
2977        ifa = if6_get_next(seq, v);
2978        ++*pos;
2979        return ifa;
2980}
Show full sources