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/core/dev.c |
Line in file: | 2592 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-05-21 20:30:05 UTC |
2562 total += done; 2563 } 2564 } 2565 } 2566 2567 /* 2568 * All done. Write the updated control block back to the caller. 2569 */ 2570 ifc.ifc_len = total; 2571 2572 /* 2573 * Both BSD and Solaris return 0 here, so we do too. 2574 */ 2575 return copy_to_user(arg, &ifc, sizeof(struct ifconf)) ? -EFAULT : 0; 2576} 2577 2578#ifdef CONFIG_PROC_FS 2579/* 2580 * This is invoked by the /proc filesystem handler to display a device 2581 * in detail. 2582 */ 2583void *dev_seq_start(struct seq_file *seq, loff_t *pos) 2584 __acquires(dev_base_lock) 2585{ 2586 struct net *net = seq_file_net(seq); 2587 loff_t off; 2588 struct net_device *dev; 2589 2590 read_lock(&dev_base_lock); 2591 if (!*pos) 2592 return SEQ_START_TOKEN; 2593 2594 off = 1; 2595 for_each_netdev(net, dev) 2596 if (off++ == *pos) 2597 return dev; 2598 2599 return NULL; 2600} 2601 2602void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)