lkml.org 
[lkml]   [2012]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 30/73] net_sched: Bug in netem reordering
    3.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------


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

    [ Upstream commit eb10192447370f19a215a8c2749332afa1199d46 ]

    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>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    net/sched/sch_netem.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    --- a/net/sched/sch_netem.c
    +++ b/net/sched/sch_netem.c
    @@ -381,8 +381,8 @@ static int netem_enqueue(struct sk_buff
    q->counter = 0;

    __skb_queue_head(&q->qdisc->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;
    }




    \
     
     \ /
      Last update: 2012-02-28 02:41    [W:0.020 / U:1.740 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site