Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: kristjan <kristjan.ugrin@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/2] tulip: napi full quantum bug
Date: Thu, 13 Dec 2007 09:35:45 -0800	[thread overview]
Message-ID: <20071213093545.436b8f8e@freepuppy.rosehill> (raw)
In-Reply-To: <1dd3c7c0712080344q414fe7c3w32d7ca6d900a52b5@mail.gmail.com>

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>


--- a/drivers/net/tulip/interrupt.c	2007-12-13 09:20:27.000000000 -0800
+++ b/drivers/net/tulip/interrupt.c	2007-12-13 09:23:34.000000000 -0800
@@ -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) {

       reply	other threads:[~2007-12-13 17:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1dd3c7c0711291113v5c197561m3121afc8f676db5f@mail.gmail.com>
     [not found] ` <20071129133622.56301c9d@freepuppy.rosehill>
     [not found]   ` <1dd3c7c0711291430r1086a46ajc4af199903a7a65e@mail.gmail.com>
     [not found]     ` <20071207161435.42ae67f8@freepuppy.rosehill>
     [not found]       ` <1dd3c7c0712080344q414fe7c3w32d7ca6d900a52b5@mail.gmail.com>
2007-12-13 17:35         ` Stephen Hemminger [this message]
2007-12-16 21:40           ` [PATCH 1/2] tulip: napi full quantum bug David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071213093545.436b8f8e@freepuppy.rosehill \
    --to=shemminger@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=jgarzik@pobox.com \
    --cc=kristjan.ugrin@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox