All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: kuznet@ms2.inr.ac.ru
Cc: benoit-lists@fb12.de, dada1@cosmosbay.com, cgf@redhat.com,
	andersg@0x63.nu, lkernel2003@tuxers.net,
	linux-kernel@vger.kernel.org, tobi@tobi.nu
Subject: Re: [TEST FIX] Re: SSH Hangs in 2.5.59 and 2.5.55 but not 2.4.x,
Date: Tue, 28 Jan 2003 16:08:06 -0800 (PST)	[thread overview]
Message-ID: <20030128.160806.13210372.davem@redhat.com> (raw)
In-Reply-To: <200301282356.CAA30301@sex.inr.ac.ru>

   From: kuznet@ms2.inr.ac.ru
   Date: Wed, 29 Jan 2003 02:56:41 +0300 (MSK)

   Hey! Interesting thing has just happened, it is the first time when I found
   the bug formulating a senstence while writing e-mail not while peering
   to code. :-)
   
Congratulations :-)

   Shheit, look into tcp_retrans_try_collapse():
   
                   if (skb->ip_summed != CHECKSUM_HW) {
                           memcpy(skb_put(skb, next_skb_size), next_skb->data, nex$                        skb->csum = csum_block_add(skb->csum, next_skb->csum, s$                }
    
   
   WHERE IS skb_put and copy when skb->ip_summed==CHECKSUM_HW??!!
   
   So, the fix is move of memcpy() line out of if clause.
   
Indeed, this bug exists in 2.4 as well of course.

This bug is 2.4.3 vintage :-)  It got added as part of initial
zerocopy merge in fact.

Here is 2.4.x version of fix, 2.5.x is identicaly sans some line
number differences.  I will push this all to Linus/Marcelo.

BTW, Alexey, please please explain to me how that trick made
by tcp_trim_head() works. :-)  I am talking about how it is
setting ip_summed to CHECKSUM_HARDWARE blindly and not even
bothering to set skb->csum correctly.

--- net/ipv4/tcp_output.c.~1~	Tue Jan 28 16:12:39 2003
+++ net/ipv4/tcp_output.c	Tue Jan 28 16:14:18 2003
@@ -721,10 +721,9 @@
 		if (next_skb->ip_summed == CHECKSUM_HW)
 			skb->ip_summed = CHECKSUM_HW;
 
-		if (skb->ip_summed != CHECKSUM_HW) {
-			memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size);
+		memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size);
+		if (skb->ip_summed != CHECKSUM_HW)
 			skb->csum = csum_block_add(skb->csum, next_skb->csum, skb_size);
-		}
 
 		/* Update sequence range on original skb. */
 		TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(next_skb)->end_seq;

  reply	other threads:[~2003-01-29  1:20 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-24 18:43 SSH Hangs in 2.5.59 and 2.5.55 but not 2.4.x, through Cisco PIX David C Niemi
2003-01-24 20:29 ` David S. Miller
2003-01-24 20:46 ` lost
2003-01-24 21:15   ` Christopher Faylor
2003-01-25  2:00     ` SSH Hangs in 2.5.59 and 2.5.55 (TCP_NODELAY?) Christopher Faylor
2003-01-27 14:27 ` SSH Hangs in 2.5.59 and 2.5.55 but not 2.4.x, through Cisco PIX David C Niemi
2003-01-27 18:06   ` David S. Miller
2003-01-27 18:11   ` David S. Miller
2003-01-27 18:28     ` Anders Gustafsson
2003-01-27 22:36       ` [TEST FIX] " David S. Miller
2003-01-28  2:25         ` lost
2003-01-28  2:57         ` [TEST FIX] Re: SSH Hangs in 2.5.59 and 2.5.55 but not 2.4.x, kuznet
2003-01-28  3:22           ` Christopher Faylor
2003-01-28  3:39         ` [TEST FIX] Re: SSH Hangs in 2.5.59 and 2.5.55 but not 2.4.x, through Cisco PIX Christopher Faylor
2003-01-28  3:55           ` kuznet
2003-01-28  7:08             ` dada1
2003-01-28 12:36               ` Sebastian Benoit
2003-01-28 14:09                 ` kuznet
2003-01-28 18:35                   ` David S. Miller
2003-01-28 19:16                     ` Sebastian Benoit
2003-01-28 20:34                       ` David S. Miller
2003-01-28 21:59                         ` Christopher Faylor
2003-01-28 22:12                         ` Sebastian Benoit
2003-01-28 23:21                           ` David S. Miller
2003-01-29  0:02                             ` [TEST FIX] Re: SSH Hangs in 2.5.59 and 2.5.55 but not 2.4.x, kuznet
2003-01-29  0:09                             ` kuznet
2003-01-29  0:46                               ` Sebastian Benoit
2003-01-29  4:12                                 ` Christopher Faylor
2003-01-29  6:52                               ` David S. Miller
2003-01-28 23:56                         ` kuznet
2003-01-29  0:08                           ` David S. Miller [this message]
2003-01-29  3:14                             ` kuznet
2003-01-29  7:32                               ` David S. Miller
2003-01-29 14:12                             ` David C Niemi
2003-01-29 14:24                               ` kuznet
2003-01-29 15:11                                 ` dada1
2003-02-02 15:40                               ` Bill Davidsen
2003-01-27 21:27 ` SSH Hangs in 2.5.59 and 2.5.55 but not 2.4.x, through Cisco PIX Bill Davidsen
  -- strict thread matches above, loose matches on Subject: below --
2003-02-03 14:23 [TEST FIX] Re: SSH Hangs in 2.5.59 and 2.5.55 but not 2.4.x, Franz Sirl
2003-02-03 17:11 ` J Sloan
2003-02-03 18:22   ` Jeff Garzik
2003-02-03 21:04 ` Bill Davidsen
     [not found] <Pine.LNX.3.96.1030203155651.28323A-100000@dstl.gov.uk>
2003-02-04  9:58 ` Tony Gale
2003-02-04 14:12   ` David Ford
2003-02-04 14:40   ` Bill Davidsen
2003-02-04 19:54 jjs

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=20030128.160806.13210372.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=andersg@0x63.nu \
    --cc=benoit-lists@fb12.de \
    --cc=cgf@redhat.com \
    --cc=dada1@cosmosbay.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkernel2003@tuxers.net \
    --cc=tobi@tobi.nu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.