Showing error 1556

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


Source:

 85                goto out;
 86        }
 87
 88        rt = v;
 89        seq_printf(seq, "%-15s  %-6d  %-5s\n",
 90                   rt->address.x25_addr, rt->sigdigits,
 91                   rt->dev ? rt->dev->name : "???");
 92out:
 93        return 0;
 94}
 95
 96static __inline__ struct sock *x25_get_socket_idx(loff_t pos)
 97{
 98        struct sock *s;
 99        struct hlist_node *node;
100
101        sk_for_each(s, node, &x25_list)
102                if (!pos--)
103                        goto found;
104        s = NULL;
105found:
106        return s;
107}
108
109static void *x25_seq_socket_start(struct seq_file *seq, loff_t *pos)
110        __acquires(x25_list_lock)
111{
112        loff_t l = *pos;
113
114        read_lock_bh(&x25_list_lock);
115        return l ? x25_get_socket_idx(--l) : SEQ_START_TOKEN;
116}
117
118static void *x25_seq_socket_next(struct seq_file *seq, void *v, loff_t *pos)
119{
120        struct sock *s;
121
122        ++*pos;
123        if (v == SEQ_START_TOKEN) {
124                s = sk_head(&x25_list);
125                goto out;
Show full sources