Merge tag 'drivers-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[sfrench/cifs-2.6.git] / net / sched / sch_api.c
index a07d55e75698cf52068ebd54fb651a45d264817a..a0b84e0e22deb4c9e998499b1e202ebaafda95f8 100644 (file)
@@ -1304,6 +1304,7 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid,
        struct gnet_dump d;
        struct qdisc_size_table *stab;
 
+       cond_resched();
        nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags);
        if (!nlh)
                goto out_nlmsg_trim;
@@ -1435,9 +1436,9 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb)
        s_idx = cb->args[0];
        s_q_idx = q_idx = cb->args[1];
 
-       rcu_read_lock();
        idx = 0;
-       for_each_netdev_rcu(net, dev) {
+       ASSERT_RTNL();
+       for_each_netdev(net, dev) {
                struct netdev_queue *dev_queue;
 
                if (idx < s_idx)
@@ -1460,8 +1461,6 @@ cont:
        }
 
 done:
-       rcu_read_unlock();
-
        cb->args[0] = idx;
        cb->args[1] = q_idx;
 
@@ -1618,6 +1617,7 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q,
        struct gnet_dump d;
        const struct Qdisc_class_ops *cl_ops = q->ops->cl_ops;
 
+       cond_resched();
        nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags);
        if (!nlh)
                goto out_nlmsg_trim;