aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-18 23:51:18 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-19 00:05:56 -0400
commit8608db031b4d2932d645709e2cfe8fbcd91a7305 (patch)
tree01b2e63f9f28dddcb5c0dd72e9c8c5b73c866685
parent69747650c814a8a79fef412c7416adf823293a3e (diff)
pkt_sched: Never schedule non-root qdiscs.
Based upon initial discovery and patch by Jarek Poplawski. The qdisc watchdogs can be attached to any qdisc, not just the root, so make sure we schedule the correct one. CBQ has a similar bug. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sched/sch_api.c2
-rw-r--r--net/sched/sch_cbq.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index c8dc72e12107..98c00847a3d2 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -426,7 +426,7 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer)
426 426
427 wd->qdisc->flags &= ~TCQ_F_THROTTLED; 427 wd->qdisc->flags &= ~TCQ_F_THROTTLED;
428 smp_wmb(); 428 smp_wmb();
429 __netif_schedule(wd->qdisc); 429 __netif_schedule(qdisc_root(wd->qdisc));
430 430
431 return HRTIMER_NORESTART; 431 return HRTIMER_NORESTART;
432} 432}
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 4e261ce62f48..47ef492c4ff4 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -654,7 +654,7 @@ static enum hrtimer_restart cbq_undelay(struct hrtimer *timer)
654 } 654 }
655 655
656 sch->flags &= ~TCQ_F_THROTTLED; 656 sch->flags &= ~TCQ_F_THROTTLED;
657 __netif_schedule(sch); 657 __netif_schedule(qdisc_root(sch));
658 return HRTIMER_NORESTART; 658 return HRTIMER_NORESTART;
659} 659}
660 660