[TULIP]: NAPI full quantum bug.
authorStephen Hemminger <shemminger@linux-foundation.org>
Mon, 7 Jan 2008 08:23:04 +0000 (00:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Jan 2008 07:30:01 +0000 (23:30 -0800)
This should fix the kernel warn/oops reported while routing.

The tulip driver has a fencepost bug with new NAPI in 2.6.24
It has an off by one bug if a full quantum is reached.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tulip/interrupt.c

index 365331446387395ca7e878adb45dd22d0065c156..0461956d3b50c723c8f92426153a47567e2ad74d 100644 (file)
@@ -151,7 +151,8 @@ int tulip_poll(struct napi_struct *napi, int budget)
                        if (tulip_debug > 5)
                                printk(KERN_DEBUG "%s: In tulip_rx(), entry %d %8.8x.\n",
                                       dev->name, entry, status);
-                      if (work_done++ >= budget)
+
+                      if (++work_done >= budget)
                                goto not_done;
 
                        if ((status & 0x38008300) != 0x0300) {