Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp388190pxk; Fri, 11 Sep 2020 09:33:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrWiERawP5q6myLwW0vGr/2bom+GQothOm2caC5TAQxfmWruQ+bMcAbGaDUufrC+ujAmbP X-Received: by 2002:aa7:d353:: with SMTP id m19mr2923293edr.275.1599842036386; Fri, 11 Sep 2020 09:33:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599842036; cv=none; d=google.com; s=arc-20160816; b=TO0aTrSK5c/42QRiAtiaXJ7DAJtxbn7O5VO444q/Z0/ydjDY8onDjq6wvuLk4dDCnR eKbOvnaubxgCehzU6fm5171dK3S8RebSPVda0UeZhwvzFj97mdkcjWR16P5LGWoBOJeF 2B4ex3MNGt5QrCFhzqnyoqjiqIhZr/dVIykoXvCANXeP+cjrNvuqZPZhuFhyXKGZ8qZm SXR8S3UZcEtlzDq2BiL6tr8TofWqDewpHIRLJhvrytoghkK2wIVcZ6Ur09PVHGv/roDd ztxOu6Q7h80XLZzH3C4NDK3LDGSHL/1K7NnKzwpV6DTWRkzsO+GDuxBtMsEgFmW0c1rB YnIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pZ+T65IEOhhxY9YmXk4+RcFbXoN4UZdYy+sfwOfbFfY=; b=D1ESZ6tpIMTquy4jS7sdhE/tiaf2zzXZ9tTDQMkdR16vT7aJ4LqkkNSFezmDaK6V65 4WBqmKH+nrGKY9p5I5bDGxuJHhSsWz6RccbxySNoUKc8MUU5gGiJpCvPh9t4yEedxg+Q 8rMtXM4av5kTlZS6H0MyR9ecIO0v8BbCLQwhdzHdx5tO2mVdf/uJ9ZrARWhGpeS+l51Q uCeQl8aw9C5kaf8GBJICL3xna1rMJ8r1nigSYzefrJb8U7x0nmVw+DGDCSjumPtgt1pn n6J8XMEei9Yk3/5AVQnit4IWF3SpiUiKFFfZW483jvINAtrU+m1LVh/mQYIFgrR7+lnL E1pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0hqBdXfa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si1583277edp.33.2020.09.11.09.33.33; Fri, 11 Sep 2020 09:33:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0hqBdXfa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726648AbgIKQcm (ORCPT + 99 others); Fri, 11 Sep 2020 12:32:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:53400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbgIKPTI (ORCPT ); Fri, 11 Sep 2020 11:19:08 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 86BCA2245C; Fri, 11 Sep 2020 12:59:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599829186; bh=ts5oWeF545x8yVXPV1jgSxK8OLtD4OAu6ZSBpIqSpDw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0hqBdXfa+hp1FV2RfxAXDI2fM9nu6Jwurpu5pla8WdBpnaW5Dj17cAJBeQBMGUb67 BBWAnpUIFXwTHVEwGkfm5CcVUM41mHXRcfbRcwhDG0LJULZWsOSdzxHOGGFft0PKgi 0fjQ+x4PkVAbcQ4hx4hlpRpBy1q6VXDQrTiIgDiQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Westphal , "David S. Miller" Subject: [PATCH 5.8 16/16] mptcp: free acked data before waiting for more memory Date: Fri, 11 Sep 2020 14:47:33 +0200 Message-Id: <20200911122500.382563283@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911122459.585735377@linuxfoundation.org> References: <20200911122459.585735377@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Westphal [ Upstream commit 1cec170d458b1d18f6f1654ca84c0804a701c5ef ] After subflow lock is dropped, more wmem might have been made available. This fixes a deadlock in mptcp_connect.sh 'mmap' mode: wmem is exhausted. But as the mptcp socket holds on to already-acked data (for retransmit) no wakeup will occur. Using 'goto restart' calls mptcp_clean_una(sk) which will free pages that have been acked completely in the mean time. Fixes: fb529e62d3f3 ("mptcp: break and restart in case mptcp sndbuf is full") Signed-off-by: Florian Westphal Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/mptcp/protocol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -772,7 +772,6 @@ fallback: restart: mptcp_clean_una(sk); -wait_for_sndbuf: __mptcp_flush_join_list(msk); ssk = mptcp_subflow_get_send(msk); while (!sk_stream_memory_free(sk) || @@ -873,7 +872,7 @@ wait_for_sndbuf: */ mptcp_set_timeout(sk, ssk); release_sock(ssk); - goto wait_for_sndbuf; + goto restart; } } }