Showing error 1453

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


Source:

183int vlan_proc_rem_dev(struct net_device *vlandev)
184{
185        struct vlan_net *vn = net_generic(dev_net(vlandev), vlan_net_id);
186
187        /** NOTE:  This will consume the memory pointed to by dent, it seems. */
188        if (vlan_dev_info(vlandev)->dent) {
189                remove_proc_entry(vlan_dev_info(vlandev)->dent->name,
190                                  vn->proc_vlan_dir);
191                vlan_dev_info(vlandev)->dent = NULL;
192        }
193        return 0;
194}
195
196/****** Proc filesystem entry points ****************************************/
197
198/*
199 * The following few functions build the content of /proc/net/vlan/config
200 */
201
202/* start read of /proc/net/vlan/config */
203static void *vlan_seq_start(struct seq_file *seq, loff_t *pos)
204        __acquires(dev_base_lock)
205{
206        struct net_device *dev;
207        struct net *net = seq_file_net(seq);
208        loff_t i = 1;
209
210        read_lock(&dev_base_lock);
211
212        if (*pos == 0)
213                return SEQ_START_TOKEN;
214
215        for_each_netdev(net, dev) {
216                if (!is_vlan_dev(dev))
217                        continue;
218
219                if (i++ == *pos)
220                        return dev;
221        }
222
223        return  NULL;
Show full sources