* Patrick McHardy <[EMAIL PROTECTED]> 2006-09-26 15:32
> Thomas Graf wrote:
> > Prevents filters from being added if the first generated
> > handle already exists.
> > 
> > Signed-off-by: Kim Nordlund <[EMAIL PROTECTED]>
> > Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>
> > 
> > Index: net-2.6/net/sched/cls_basic.c
> > ===================================================================
> > --- net-2.6.orig/net/sched/cls_basic.c      2006-09-26 13:35:29.000000000 
> > +0200
> > +++ net-2.6/net/sched/cls_basic.c   2006-09-26 13:35:39.000000000 +0200
> > @@ -194,7 +194,7 @@
> >     if (handle)
> >             f->handle = handle;
> >     else {
> > -           int i = 0x80000000;
> > +           unsigned int i = 0x80000000;
> 
> I don't see how this patch changes anything, the loop already
> ends when i == 0 (and it can't go negative):
> 
>         do {
>                 if (++head->hgenerator == 0x7FFFFFFF)
>                         head->hgenerator = 1;
>         } while (--i > 0 && basic_get(tp, head->hgenerator));
> 
> which should also make sure that no handle gets used twice:
> 
>         if (i <= 0) {
>                 printk(KERN_ERR "Insufficient number of handles\n");
>                 goto errout;
>         }

You're right, 0x80000000 - 1 is already positive. Ignore the patch.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to