diff options
-rw-r--r-- | net/8021q/vlanproc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index 6262c335f3c2..9ec1f057c03a 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c | |||
@@ -201,18 +201,17 @@ int vlan_proc_rem_dev(struct net_device *vlandev) | |||
201 | 201 | ||
202 | /* start read of /proc/net/vlan/config */ | 202 | /* start read of /proc/net/vlan/config */ |
203 | static void *vlan_seq_start(struct seq_file *seq, loff_t *pos) | 203 | static void *vlan_seq_start(struct seq_file *seq, loff_t *pos) |
204 | __acquires(dev_base_lock) | 204 | __acquires(rcu) |
205 | { | 205 | { |
206 | struct net_device *dev; | 206 | struct net_device *dev; |
207 | struct net *net = seq_file_net(seq); | 207 | struct net *net = seq_file_net(seq); |
208 | loff_t i = 1; | 208 | loff_t i = 1; |
209 | 209 | ||
210 | read_lock(&dev_base_lock); | 210 | rcu_read_lock(); |
211 | |||
212 | if (*pos == 0) | 211 | if (*pos == 0) |
213 | return SEQ_START_TOKEN; | 212 | return SEQ_START_TOKEN; |
214 | 213 | ||
215 | for_each_netdev(net, dev) { | 214 | for_each_netdev_rcu(net, dev) { |
216 | if (!is_vlan_dev(dev)) | 215 | if (!is_vlan_dev(dev)) |
217 | continue; | 216 | continue; |
218 | 217 | ||
@@ -234,7 +233,7 @@ static void *vlan_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
234 | if (v == SEQ_START_TOKEN) | 233 | if (v == SEQ_START_TOKEN) |
235 | dev = net_device_entry(&net->dev_base_head); | 234 | dev = net_device_entry(&net->dev_base_head); |
236 | 235 | ||
237 | for_each_netdev_continue(net, dev) { | 236 | for_each_netdev_continue_rcu(net, dev) { |
238 | if (!is_vlan_dev(dev)) | 237 | if (!is_vlan_dev(dev)) |
239 | continue; | 238 | continue; |
240 | 239 | ||
@@ -245,9 +244,9 @@ static void *vlan_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
245 | } | 244 | } |
246 | 245 | ||
247 | static void vlan_seq_stop(struct seq_file *seq, void *v) | 246 | static void vlan_seq_stop(struct seq_file *seq, void *v) |
248 | __releases(dev_base_lock) | 247 | __releases(rcu) |
249 | { | 248 | { |
250 | read_unlock(&dev_base_lock); | 249 | rcu_read_unlock(); |
251 | } | 250 | } |
252 | 251 | ||
253 | static int vlan_seq_show(struct seq_file *seq, void *v) | 252 | static int vlan_seq_show(struct seq_file *seq, void *v) |