Commit 1609e23b authored by Hagen Paul Pfeifer's avatar Hagen Paul Pfeifer Committed by Greg Kroah-Hartman

net_sched: Bug in netem reordering

[ Upstream commit eb101924 ]

Not now, but it looks you are correct. q->qdisc is NULL until another
additional qdisc is attached (beside tfifo). See 50612537.
The following patch should work.

From: Hagen Paul Pfeifer <hagen@jauu.net>

netem: catch NULL pointer by updating the real qdisc statistic
Reported-by: default avatarVijay Subramanian <subramanian.vijay@gmail.com>
Signed-off-by: default avatarHagen Paul Pfeifer <hagen@jauu.net>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9f8a28dc
...@@ -381,8 +381,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) ...@@ -381,8 +381,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
q->counter = 0; q->counter = 0;
__skb_queue_head(&q->qdisc->q, skb); __skb_queue_head(&q->qdisc->q, skb);
q->qdisc->qstats.backlog += qdisc_pkt_len(skb); sch->qstats.backlog += qdisc_pkt_len(skb);
q->qdisc->qstats.requeues++; sch->qstats.requeues++;
ret = NET_XMIT_SUCCESS; ret = NET_XMIT_SUCCESS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment