From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] tcp: ignore Fast Open on repair mode Date: Fri, 27 Apr 2018 11:50:37 -0400 (EDT) Message-ID: <20180427.115037.1333981319439925579.davem@davemloft.net> References: <20180425183308.70232-1-ycheng@google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, edumazet@google.com, ncardwell@google.com To: ycheng@google.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:53776 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758472AbeD0Pul (ORCPT ); Fri, 27 Apr 2018 11:50:41 -0400 In-Reply-To: <20180425183308.70232-1-ycheng@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Yuchung Cheng Date: Wed, 25 Apr 2018 11:33:08 -0700 > The TCP repair sequence of operation is to first set the socket in > repair mode, then inject the TCP stats into the socket with repair > socket options, then call connect() to re-activate the socket. The > connect syscall simply returns and set state to ESTABLISHED > mode. As a result Fast Open is meaningless for TCP repair. > > However allowing sendto() system call with MSG_FASTOPEN flag half-way > during the repair operation could unexpectedly cause data to be > sent, before the operation finishes changing the internal TCP stats > (e.g. MSS). This in turn triggers TCP warnings on inconsistent > packet accounting. > > The fix is to simply disallow Fast Open operation once the socket > is in the repair mode. > > Reported-by: syzbot > Signed-off-by: Yuchung Cheng > Reviewed-by: Neal Cardwell > Reviewed-by: Eric Dumazet Applied and queued up for -stable, thanks Yuchung.