Skip to contentSkip to conversation

tulip: napi full quantum bug

PATCH In review Stephen Hemminger 2 participants 2 messages Dec 13, 2007 – Dec 16, 2007 5 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

PATCH 1/2 tulip: napi full quantum bug

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.

drivers/net/tulip/interrupt.c +2 -1
@@ -151,7 +151,8 @@ int tulip_poll(struct napi_struct *napi,
                        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) {
maintainer Acked-by on v1 1/2
#6 lore raw

From: Stephen Hemminger <[email protected]>
Date: Thu, 13 Dec 2007 09:35:45 -0800

Quoted 6 lines

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.

Jeff, please apply if you haven't already.

Quoted 12 lines
drivers/net/tulip/interrupt.c +2 -1
@@ -151,7 +151,8 @@ int tulip_poll(struct napi_struct *napi,
                        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) {