Showing error 1289

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


Source:

 970
 971        seq_printf(seq, "%08X %s %8s\n",
 972                   po->pppoe_pa.sid, print_mac(mac, po->pppoe_pa.remote), dev_name);
 973out:
 974        return 0;
 975}
 976
 977static __inline__ struct pppox_sock *pppoe_get_idx(loff_t pos)
 978{
 979        struct pppox_sock *po;
 980        int i = 0;
 981
 982        for (; i < PPPOE_HASH_SIZE; i++) {
 983                po = item_hash_table[i];
 984                while (po) {
 985                        if (!pos--)
 986                                goto out;
 987                        po = po->next;
 988                }
 989        }
 990out:
 991        return po;
 992}
 993
 994static void *pppoe_seq_start(struct seq_file *seq, loff_t *pos)
 995        __acquires(pppoe_hash_lock)
 996{
 997        loff_t l = *pos;
 998
 999        read_lock_bh(&pppoe_hash_lock);
1000        return l ? pppoe_get_idx(--l) : SEQ_START_TOKEN;
1001}
1002
1003static void *pppoe_seq_next(struct seq_file *seq, void *v, loff_t *pos)
1004{
1005        struct pppox_sock *po;
1006
1007        ++*pos;
1008        if (v == SEQ_START_TOKEN) {
1009                po = pppoe_get_idx(0);
1010                goto out;
Show full sources