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/ipx/ipx_proc.c |
Line in file: | 240 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
Smatch (1.59) |
Entered: | 2012-03-02 21:35:17 UTC |
210 i = ipx_interfaces_head(); 211 if (!i) 212 goto out; 213 sk = sk_head(&i->if_sklist); 214 if (sk) 215 spin_lock_bh(&i->if_sklist_lock); 216 goto out; 217 } 218 sk = v; 219 next = sk_next(sk); 220 if (next) { 221 sk = next; 222 goto out; 223 } 224 ipxs = ipx_sk(sk); 225 i = ipxs->intrfc; 226 spin_unlock_bh(&i->if_sklist_lock); 227 sk = NULL; 228 for (;;) { 229 i = ipx_interfaces_next(i); 230 if (!i) 231 break; 232 spin_lock_bh(&i->if_sklist_lock); 233 if (!hlist_empty(&i->if_sklist)) { 234 sk = sk_head(&i->if_sklist); 235 break; 236 } 237 spin_unlock_bh(&i->if_sklist_lock); 238 } 239out: 240 return sk; 241} 242 243static int ipx_seq_socket_show(struct seq_file *seq, void *v) 244{ 245 struct sock *s; 246 struct ipx_sock *ipxs; 247 248 if (v == SEQ_START_TOKEN) { 249#ifdef CONFIG_IPX_INTERN 250 seq_puts(seq, "Local_Address "