[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48787E1A.3030804@gmail.com>
Date: Sat, 12 Jul 2008 11:49:14 +0200
From: Jarek Poplawski <jarkao2@...il.com>
To: David Miller <davem@...emloft.net>
CC: joy@...uzijast.net, mchan@...adcom.com, billfink@...dspring.com,
bhutchings@...arflare.com, netdev@...r.kernel.org,
mirrors@...ian.org, kaber@...sh.net, devik@....cz
Subject: Re: bnx2_poll panicking kernel
David Miller wrote, On 07/11/2008 11:56 AM:
...
> diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
> index 3fb58f4..aa20b47 100644
> --- a/net/sched/sch_htb.c
> +++ b/net/sched/sch_htb.c
> @@ -583,6 +583,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
> if (q->direct_queue.qlen < q->direct_qlen) {
> __skb_queue_tail(&q->direct_queue, skb);
> q->direct_pkts++;
> + ret = NET_XMIT_SUCCESS;
> } else {
> kfree_skb(skb);
> sch->qstats.drops++;
> @@ -595,22 +596,26 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
> kfree_skb(skb);
> return ret;
> #endif
> - } else if (cl->un.leaf.q->enqueue(skb, cl->un.leaf.q) !=
> - NET_XMIT_SUCCESS) {
> - sch->qstats.drops++;
> - cl->qstats.drops++;
> - return NET_XMIT_DROP;
> } else {
> - cl->bstats.packets +=
> - skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1;
> - cl->bstats.bytes += skb->len;
> - htb_activate(q, cl);
> + ret = cl->un.leaf.q->enqueue(skb, cl->un.leaf.q);
> + if (ret == NET_XMIT_DROP) {
> + sch->qstats.drops++;
> + cl->qstats.drops++;
> + } else {
> + cl->bstats.packets +=
> + skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1;
> + cl->bstats.bytes += skb->len;
> + htb_activate(q, cl);
This isn't correct: htb_activate() needs cl->un.leaf.q->q.qlen > 0, and
only NET_XMIT_SUCCESS can guarantee this.
Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists