aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorHerbert Xu <[email protected]>2005-10-12 22:59:39 +0000
committerDavid S. Miller <[email protected]>2005-10-12 22:59:39 +0000
commit9ff5c59ce278c37bca22fbf98076d199bcaf9845 (patch)
treeeadd2da5cdf0cbe158c55567684385f6db86394f /net/ipv4/tcp_output.c
parent[NETPOLL]: wrong return for null netpoll_poll_lock() (diff)
downloadkernel-9ff5c59ce278c37bca22fbf98076d199bcaf9845.tar.gz
kernel-9ff5c59ce278c37bca22fbf98076d199bcaf9845.zip
[TCP]: Add code to help track down "BUG at net/ipv4/tcp_output.c:438!"
This is the second report of this bug. Unfortunately the first reporter hasn't been able to reproduce it since to provide more debugging info. So let's apply this patch for 2.6.14 to 1) Make this non-fatal. 2) Provide the info we need to track it down. Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 8225e4257258..f37a50e55b68 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -435,7 +435,14 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
int nsize, old_factor;
u16 flags;
- BUG_ON(len >= skb->len);
+ if (unlikely(len >= skb->len)) {
+ printk(KERN_DEBUG "TCP: seg_size=%u, mss=%u, seq=%u, "
+ "end_seq=%u, skb->len=%u.\n", len, mss_now,
+ TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq,
+ skb->len);
+ WARN_ON(1);
+ return 0;
+ }
nsize = skb_headlen(skb) - len;
if (nsize < 0)