diff options
author | Hagen Paul Pfeifer <hagen@jauu.net> | 2012-01-04 17:35:26 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-05 13:27:39 -0500 |
commit | eb10192447370f19a215a8c2749332afa1199d46 (patch) | |
tree | 3c29d462ed3bc3b6c7af1492ca66395d2f0c5d42 /net | |
parent | e1e0918fcaea7b8100ed9f96f3ecd9eb9b867102 (diff) | |
download | linux-eb10192447370f19a215a8c2749332afa1199d46.tar.gz linux-eb10192447370f19a215a8c2749332afa1199d46.tar.bz2 linux-eb10192447370f19a215a8c2749332afa1199d46.zip |
net_sched: Bug in netem reordering
Not now, but it looks you are correct. q->qdisc is NULL until another
additional qdisc is attached (beside tfifo). See 50612537e9ab2969312.
The following patch should work.
From: Hagen Paul Pfeifer <hagen@jauu.net>
netem: catch NULL pointer by updating the real qdisc statistic
Reported-by: Vijay Subramanian <subramanian.vijay@gmail.com>
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/sch_netem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 06a5cebad342..e7e1d0b57b3d 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -458,8 +458,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) q->counter = 0; __skb_queue_head(&sch->q, skb); - q->qdisc->qstats.backlog += qdisc_pkt_len(skb); - q->qdisc->qstats.requeues++; + sch->qstats.backlog += qdisc_pkt_len(skb); + sch->qstats.requeues++; ret = NET_XMIT_SUCCESS; } |