[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070919.104300.92582764.davem@davemloft.net>
Date: Wed, 19 Sep 2007 10:43:00 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: kaber@...sh.net
Cc: kuznet@....inr.ac.ru, cebbert@...hat.com, netdev@...r.kernel.org
Subject: Re: SFQ qdisc crashes with limit of 2 packets
From: Patrick McHardy <kaber@...sh.net>
Date: Wed, 19 Sep 2007 15:08:22 +0200
> Alexey Kuznetsov wrote:
> > Hello!
> >
> >>CCed Alexey just to be safe, but I think the patch should be fine.
> >
> >
> > Yes. But what'a about limit == 1? tc prohibits this case, but it is still
> > not nice to have the bug in kernel. Plus, code remains creepy, the check
> >
> > + if (++sch->q.qlen < q->limit) {
> >
> > still looks as a scary off-by-one. I would go all the way: replace this
> > with natural:
> >
> > if (++sch->q.qlen <= q->limit) {
> >
> > and maxed q->limit at SFQ_DEPTH-2. Patch enclosed.
>
> Thats even better, thanks :)
I'll put this into my tree and wait while Alexey does his tests.
Thanks.
-
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