public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eli Carter <eli.carter@inet.com>
To: linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk,
	becker@webserv.gsfc.nasa.gov
Subject: [PATCH] lance.c - dev_kfree_skb() then reference skb->len
Date: Tue, 28 Nov 2000 12:08:16 -0600	[thread overview]
Message-ID: <3A23F490.69688B84@inet.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]

Greetings all,

Patch is against 2.2.17, drivers/net/lance.c.
I believe this to be "obviously correct," but please correct me if I'm
wrong.
This moves a reference to skb->len to before the possible
dev_kfree_skb(skb) call.  Though it appears to work as is, I suspect it
is incorrect.

Please apply or let me know why.

Eli

ps.  It's an attachment rather than inline because I can't seem to get
Netscape (4.71) to do that without replacing tabs with spaces.  Grr.

--------------------. "To the systems programmer, users and applications
Eli Carter          | serve only to provide a test load."
eli.carter@inet.com `---------------------------------- (random fortune)

[-- Attachment #2: lance.c.diff --]
[-- Type: text/plain, Size: 561 bytes --]

--- lance.c.2.2.17	Mon Nov 13 12:13:11 2000
+++ lance.c	Tue Nov 28 11:46:16 2000
@@ -926,6 +926,8 @@
 
 	lp->tx_ring[entry].misc = 0x0000;
 
+	lp->stats.tx_bytes += skb->len;
+
 	/* If any part of this buffer is >16M we must copy it to a low-memory
 	   buffer. */
 	if ((u32)virt_to_bus(skb->data) + skb->len > 0x01000000) {
@@ -941,7 +943,6 @@
 		lp->tx_ring[entry].base = ((u32)virt_to_bus(skb->data) & 0xffffff) | 0x83000000;
 	}
 	lp->cur_tx++;
-	lp->stats.tx_bytes += skb->len;
 
 	/* Trigger an immediate send poll. */
 	outw(0x0000, ioaddr+LANCE_ADDR);

             reply	other threads:[~2000-11-28 18:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-28 18:08 Eli Carter [this message]
2000-11-28 20:41 ` [PATCH] lance.c - dev_kfree_skb() then reference skb->len Donald Becker

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=3A23F490.69688B84@inet.com \
    --to=eli.carter@inet.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=becker@webserv.gsfc.nasa.gov \
    --cc=linux-kernel@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