Showing error 1554

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: 195
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

165                   x25->t21 / HZ, x25->t22 / HZ, x25->t23 / HZ,
166                   atomic_read(&s->sk_wmem_alloc),
167                   atomic_read(&s->sk_rmem_alloc),
168                   s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L);
169out:
170        return 0;
171}
172
173static __inline__ struct x25_forward *x25_get_forward_idx(loff_t pos)
174{
175        struct x25_forward *f;
176        struct list_head *entry;
177
178        list_for_each(entry, &x25_forward_list) {
179                f = list_entry(entry, struct x25_forward, node);
180                if (!pos--)
181                        goto found;
182        }
183
184        f = NULL;
185found:
186        return f;
187}
188
189static void *x25_seq_forward_start(struct seq_file *seq, loff_t *pos)
190        __acquires(x25_forward_list_lock)
191{
192        loff_t l = *pos;
193
194        read_lock_bh(&x25_forward_list_lock);
195        return l ? x25_get_forward_idx(--l) : SEQ_START_TOKEN;
196}
197
198static void *x25_seq_forward_next(struct seq_file *seq, void *v, loff_t *pos)
199{
200        struct x25_forward *f;
201
202        ++*pos;
203        if (v == SEQ_START_TOKEN) {
204                f = NULL;
205                if (!list_empty(&x25_forward_list))
Show full sources