Showing error 1492

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


Source:

640        struct net *net = seq_file_net(seq);
641
642        fl = fl->next;
643try_again:
644        while (fl && fl->fl_net != net)
645                fl = fl->next;
646
647        while (!fl) {
648                if (++state->bucket <= FL_HASH_MASK) {
649                        fl = fl_ht[state->bucket];
650                        goto try_again;
651                } else
652                        break;
653        }
654        return fl;
655}
656
657static struct ip6_flowlabel *ip6fl_get_idx(struct seq_file *seq, loff_t pos)
658{
659        struct ip6_flowlabel *fl = ip6fl_get_first(seq);
660        if (fl)
661                while (pos && (fl = ip6fl_get_next(seq, fl)) != NULL)
662                        --pos;
663        return pos ? NULL : fl;
664}
665
666static void *ip6fl_seq_start(struct seq_file *seq, loff_t *pos)
667        __acquires(ip6_fl_lock)
668{
669        read_lock_bh(&ip6_fl_lock);
670        return *pos ? ip6fl_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
671}
672
673static void *ip6fl_seq_next(struct seq_file *seq, void *v, loff_t *pos)
674{
675        struct ip6_flowlabel *fl;
676
677        if (v == SEQ_START_TOKEN)
678                fl = ip6fl_get_first(seq);
679        else
680                fl = ip6fl_get_next(seq, v);
Show full sources