From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] tcp: do not mangle skb->cb[] in tcp_make_synack() Date: Fri, 03 Nov 2017 14:32:14 +0900 (KST) Message-ID: <20171103.143214.32665592248209118.davem@davemloft.net> References: <1509584410.3828.64.camel@edumazet-glaptop3.roam.corp.google.com> <1509589291.2849.1.camel@edumazet-glaptop3.roam.corp.google.com> <1509651025.2849.23.camel@edumazet-glaptop3.roam.corp.google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: cpaasch@apple.com, edumazet@google.com, netdev@vger.kernel.org To: eric.dumazet@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:35390 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751694AbdKCFcS (ORCPT ); Fri, 3 Nov 2017 01:32:18 -0400 In-Reply-To: <1509651025.2849.23.camel@edumazet-glaptop3.roam.corp.google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Thu, 02 Nov 2017 12:30:25 -0700 > From: Eric Dumazet > > Christoph Paasch sent a patch to address the following issue : > > tcp_make_synack() is leaving some TCP private info in skb->cb[], > then send the packet by other means than tcp_transmit_skb() > > tcp_transmit_skb() makes sure to clear skb->cb[] to not confuse > IPv4/IPV6 stacks, but we have no such cleanup for SYNACK. > > tcp_make_synack() should not use tcp_init_nondata_skb() : > > tcp_init_nondata_skb() really should be limited to skbs put in write/rtx > queues (the ones that are only sent via tcp_transmit_skb()) > > This patch fixes the issue and should even save few cpu cycles ;) > > Fixes: 971f10eca186 ("tcp: better TCP_SKB_CB layout to reduce cache line misses") > Signed-off-by: Eric Dumazet > Reported-by: Christoph Paasch Applied and queued up for -stable.