Skip to content

Commit

Permalink
net_sched: Bug in netem reordering
Browse files Browse the repository at this point in the history
Not now, but it looks you are correct. q->qdisc is NULL until another
additional qdisc is attached (beside tfifo). See 5061253.
The following patch should work.

From: Hagen Paul Pfeifer <[email protected]>

netem: catch NULL pointer by updating the real qdisc statistic

Reported-by: Vijay Subramanian <[email protected]>
Signed-off-by: Hagen Paul Pfeifer <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
hgn authored and davem330 committed Jan 5, 2012
1 parent e1e0918 commit eb10192
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sched/sch_netem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit eb10192

Please sign in to comment.