| Submitter | Hagen Paul Pfeifer |
|---|---|
| Date | Jan. 5, 2012, 3:35 a.m. |
| Message ID | <1325734526-13428-1-git-send-email-hagen@jauu.net> |
| Download | mbox | patch |
| Permalink | /patch/134410/ |
| State | Accepted |
| Delegated to: | David Miller |
| Headers | show |
Comments
Le jeudi 05 janvier 2012 à 04:35 +0100, Hagen Paul Pfeifer a écrit : > 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> > --- Thanks for this fix ! Acked-by: Eric Dumazet <eric.dumazet@gmail.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Eric Dumazet <eric.dumazet@gmail.com> Date: Thu, 05 Jan 2012 06:34:16 +0100 > Le jeudi 05 janvier 2012 à 04:35 +0100, Hagen Paul Pfeifer a écrit : >> 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> >> --- > > Thanks for this fix ! > > Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 06a5ceb..cc29d18 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; }