From: "David S. Miller" <davem@davemloft.net>
To: James Morris <jmorris@redhat.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: 2.6.9-rc1-mm5: TCP oopses
Date: Mon, 13 Sep 2004 19:08:58 -0700 [thread overview]
Message-ID: <20040913190858.12544431.davem@davemloft.net> (raw)
In-Reply-To: <Xine.LNX.4.44.0409132019170.22477-200000@thoron.boston.redhat.com>
On Mon, 13 Sep 2004 20:25:38 -0400 (EDT)
James Morris <jmorris@redhat.com> wrote:
> I'm experiencing TCP related oopses with this kernel (not seen in -mm4),
> .config file attached.
>
> Here are two backtraces, the first happened a few seconds after logging
> in via ssh, the second happened soon after boot (using selinux=0, just to
> make sure).
I think I fixed this one yesterday. Callers of tcp_fragment()
in tcp_output.c were not accounting packets correctly. I
believe this is what will fix it, and this is in Linus's
tree already.
I guess you have an e1000 in this box? :)
(either that or some other card whose driver
enables TSO by default)
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/10 15:21:43-07:00 davem@nuts.davemloft.net
# [TCP]: Fix packet counting when fragmenting already sent packets.
#
# Calls to tcp_fragment() change the tso_factor of
# an SKB, so we need to deal with that.
#
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
# net/ipv4/tcp_output.c
# 2004/09/10 15:21:13-07:00 davem@nuts.davemloft.net +12 -2
# [TCP]: Fix packet counting when fragmenting already sent packets.
#
# Calls to tcp_fragment() change the tso_factor of
# an SKB, so we need to deal with that.
#
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
--- a/net/ipv4/tcp_output.c 2004-09-13 18:51:38 -07:00
+++ b/net/ipv4/tcp_output.c 2004-09-13 18:51:38 -07:00
@@ -681,8 +681,12 @@
TCP_SKB_CB(skb)->when = tcp_time_stamp;
if (tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC)))
break;
- /* Advance the send_head. This one is sent out. */
+
+ /* Advance the send_head. This one is sent out.
+ * This call will increment packets_out.
+ */
update_send_head(sk, tp, skb);
+
tcp_minshall_update(tp, mss_now, skb);
sent_pkts = 1;
}
@@ -968,11 +972,17 @@
return -EAGAIN;
if (skb->len > cur_mss) {
+ int old_factor = TCP_SKB_CB(skb)->tso_factor;
+ int new_factor;
+
if (tcp_fragment(sk, skb, cur_mss))
return -ENOMEM; /* We'll try again later. */
/* New SKB created, account for it. */
- tcp_inc_pcount(&tp->packets_out, skb);
+ new_factor = TCP_SKB_CB(skb)->tso_factor;
+ tcp_dec_pcount_explicit(&tp->packets_out,
+ new_factor - old_factor);
+ tcp_inc_pcount(&tp->packets_out, skb->next);
}
/* Collapse two adjacent packets if worthwhile and we can. */
next prev parent reply other threads:[~2004-09-14 2:13 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-13 8:50 2.6.9-rc1-mm5 Andrew Morton
2004-09-13 9:22 ` 2.6.9-rc1-mm5 Nick Piggin
2004-09-13 17:24 ` 2.6.9-rc1-mm5 Jesse Barnes
2004-09-13 18:06 ` 2.6.9-rc1-mm5 Paul Jackson
2004-09-13 18:10 ` 2.6.9-rc1-mm5 Jesse Barnes
2004-09-13 21:30 ` 2.6.9-rc1-mm5 Jesse Barnes
2004-09-14 2:02 ` 2.6.9-rc1-mm5 Nick Piggin
2004-09-14 2:12 ` 2.6.9-rc1-mm5 Jesse Barnes
2004-09-13 10:20 ` 2.6.9-rc1-mm5 Christoph Hellwig
2004-09-13 10:48 ` 2.6.9-rc1-mm5 Rafael J. Wysocki
2004-09-13 11:13 ` 2.6.9-rc1-mm5 Nikita Danilov
2004-09-13 13:40 ` 2.6.9-rc1-mm5 Christoph Hellwig
2004-09-13 11:16 ` 2.6.9-rc1-mm5 Rafael J. Wysocki
2004-09-13 11:01 ` 2.6.9-rc1-mm5 William Lee Irwin III
2004-09-13 15:09 ` 2.6.9-rc1-mm5 Martin J. Bligh
2004-09-13 15:18 ` 2.6.9-rc1-mm5 Paul Jackson
2004-09-13 16:11 ` 2.6.9-rc1-mm5 Martin J. Bligh
2004-09-13 16:22 ` 2.6.9-rc1-mm5 Paul Jackson
2004-09-13 15:20 ` 2.6.9-rc1-mm5 Kirill Korotaev
2004-09-13 20:01 ` 2.6.9-rc1-mm5 Andrew Morton
2004-09-14 6:39 ` 2.6.9-rc1-mm5 Kirill Korotaev
2004-09-13 20:30 ` 2.6.9-rc1-mm5 Pasi Savolainen
2004-09-13 21:06 ` 2.6.9-rc1-mm5 Rafael J. Wysocki
2004-09-14 9:07 ` 2.6.9-rc1-mm5 Nikita Danilov
2004-09-14 9:12 ` 2.6.9-rc1-mm5 Andrew Morton
2004-09-14 13:21 ` 2.6.9-rc1-mm5 David Howells
2004-09-14 14:24 ` 2.6.9-rc1-mm5 James Morris
2004-09-14 15:36 ` 2.6.9-rc1-mm5 David Howells
2004-09-13 21:47 ` 2.6.9-rc1-mm5 scheduling while atomic Jesse Barnes
2004-09-13 22:56 ` Paul Jackson
2004-09-13 21:56 ` 2.6.9-rc1-mm5 bug in tcp_recvmsg? Jesse Barnes
2004-09-13 22:36 ` David S. Miller
2004-09-13 22:44 ` Jesse Barnes
2004-09-13 22:47 ` David S. Miller
2004-09-13 23:54 ` Jesse Barnes
2004-09-13 23:55 ` David S. Miller
2004-09-14 0:03 ` Jesse Barnes
2004-09-14 0:21 ` David S. Miller
2004-09-14 17:09 ` Jesse Barnes
2004-09-14 0:25 ` 2.6.9-rc1-mm5: TCP oopses James Morris
2004-09-14 2:08 ` David S. Miller [this message]
2004-09-14 3:04 ` James Morris
2004-09-14 3:34 ` Herbert Xu
2004-09-14 4:53 ` David S. Miller
2004-09-14 4:55 ` David S. Miller
2004-09-14 5:07 ` James Morris
2004-09-14 2:25 ` [pidhashing] [0/3] pid allocator updates William Lee Irwin III
2004-09-14 2:28 ` [pidhashing] [1/3] retain older vendor copyright William Lee Irwin III
2004-09-14 2:31 ` [pidhashing] [2/3] lower PID_MAX_LIMIT for 32-bit machines William Lee Irwin III
2004-09-14 2:36 ` [pidhashing] [3/3] enforce PID_MAX_LIMIT in sysctls William Lee Irwin III
2004-09-14 2:38 ` [pidhashing] [2/3] lower PID_MAX_LIMIT for 32-bit machines William Lee Irwin III
2004-09-14 10:55 ` Roger Luethi
2004-09-14 11:10 ` Lars Marowsky-Bree
2004-09-14 12:06 ` Lars Marowsky-Bree
2004-09-14 12:08 ` Roger Luethi
2004-09-14 15:41 ` William Lee Irwin III
2004-09-14 15:47 ` Roger Leuthi
2004-09-14 16:41 ` William Lee Irwin III
2004-09-14 17:16 ` Roger Luethi
2004-09-14 2:53 ` [procfs] [1/1] fix task_mmu.c text size reporting William Lee Irwin III
2004-09-14 2:54 ` William Lee Irwin III
2004-09-15 10:51 ` [procfs] [2/1] report per-process pagetable usage William Lee Irwin III
2004-09-14 4:47 ` [profile] amortize atomic hit count increments William Lee Irwin III
2004-09-14 5:05 ` David S. Miller
2004-09-14 5:32 ` William Lee Irwin III
2004-09-14 5:49 ` David S. Miller
2004-09-14 6:10 ` William Lee Irwin III
2004-09-14 6:18 ` William Lee Irwin III
2004-09-14 5:05 ` Andrew Morton
2004-09-14 5:21 ` William Lee Irwin III
2004-09-14 6:43 ` William Lee Irwin III
2004-09-14 6:52 ` Andrew Morton
2004-09-14 7:55 ` William Lee Irwin III
2004-09-14 8:48 ` William Lee Irwin III
2004-09-14 11:34 ` Andrea Arcangeli
2004-09-14 15:51 ` William Lee Irwin III
2004-09-14 16:05 ` Andrea Arcangeli
2004-09-14 16:16 ` Jesse Barnes
2004-09-14 16:31 ` Andrea Arcangeli
2004-09-14 16:45 ` William Lee Irwin III
2004-09-14 19:00 ` William Lee Irwin III
2004-09-14 19:23 ` William Lee Irwin III
2004-09-14 20:02 ` William Lee Irwin III
2004-09-14 20:04 ` William Lee Irwin III
2004-09-14 21:04 ` William Lee Irwin III
2004-09-14 21:11 ` William Lee Irwin III
2004-09-14 10:00 ` 2.6.9-rc1-mm5 Lorenzo Allegrucci
2004-09-15 11:36 ` 2.6.9-rc1-mm5 William Lee Irwin III
2004-09-15 11:38 ` 2.6.9-rc1-mm5 Jens Axboe
2004-09-15 12:28 ` 2.6.9-rc1-mm5 William Lee Irwin III
2004-09-15 12:41 ` 2.6.9-rc1-mm5 Jens Axboe
2004-09-15 12:50 ` 2.6.9-rc1-mm5 Jens Axboe
2004-09-15 12:53 ` 2.6.9-rc1-mm5 William Lee Irwin III
2004-09-16 0:38 ` 2.6.9-rc1-mm5 William Lee Irwin III
2004-09-16 5:44 ` 2.6.9-rc1-mm5 William Lee Irwin III
2004-09-16 5:45 ` 2.6.9-rc1-mm5 Jens Axboe
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=20040913190858.12544431.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@osdl.org \
--cc=jmorris@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
/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