From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] net/tls: Don't recursively call push_record during tls_write_space callbacks Date: Tue, 01 May 2018 19:02:57 -0400 (EDT) Message-ID: <20180501.190257.1668323183142583789.davem@davemloft.net> References: <20180501200539.GA69207@davejwatson-mba.dhcp.thefacebook.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: andre@tomt.net, netdev@vger.kernel.org, borisp@mellanox.com, aviadye@mellanox.com To: davejwatson@fb.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:52030 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751605AbeEAXC7 (ORCPT ); Tue, 1 May 2018 19:02:59 -0400 In-Reply-To: <20180501200539.GA69207@davejwatson-mba.dhcp.thefacebook.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Dave Watson Date: Tue, 1 May 2018 13:05:39 -0700 > It is reported that in some cases, write_space may be called in > do_tcp_sendpages, such that we recursively invoke do_tcp_sendpages again: > > [ 660.468802] ? do_tcp_sendpages+0x8d/0x580 > [ 660.468826] ? tls_push_sg+0x74/0x130 [tls] > [ 660.468852] ? tls_push_record+0x24a/0x390 [tls] > [ 660.468880] ? tls_write_space+0x6a/0x80 [tls] > ... > > tls_push_sg already does a loop over all sending sg's, so ignore > any tls_write_space notifications until we are done sending. > We then have to call the previous write_space to wake up > poll() waiters after we are done with the send loop. > > Reported-by: Andre Tomt > Signed-off-by: Dave Watson Applied.