aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r--net/sched/sch_api.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 1acfd29cc826..876ba4bb6ae9 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1279,9 +1279,10 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb)
1279 1279
1280 s_idx = cb->args[0]; 1280 s_idx = cb->args[0];
1281 s_q_idx = q_idx = cb->args[1]; 1281 s_q_idx = q_idx = cb->args[1];
1282 read_lock(&dev_base_lock); 1282
1283 rcu_read_lock();
1283 idx = 0; 1284 idx = 0;
1284 for_each_netdev(&init_net, dev) { 1285 for_each_netdev_rcu(&init_net, dev) {
1285 struct netdev_queue *dev_queue; 1286 struct netdev_queue *dev_queue;
1286 1287
1287 if (idx < s_idx) 1288 if (idx < s_idx)
@@ -1302,7 +1303,7 @@ cont:
1302 } 1303 }
1303 1304
1304done: 1305done:
1305 read_unlock(&dev_base_lock); 1306 rcu_read_unlock();
1306 1307
1307 cb->args[0] = idx; 1308 cb->args[0] = idx;
1308 cb->args[1] = q_idx; 1309 cb->args[1] = q_idx;