mptcp: free acked data before waiting for more memory
authorFlorian Westphal <fw@strlen.de>
Tue, 25 Aug 2020 23:31:05 +0000 (01:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Sep 2020 12:22:14 +0000 (14:22 +0200)
commitcdba995d2f19932db89a91cf0d9a99d6e7d4659e
treea124f1a692cb7057b2dbd2e19a2db69661cfd04c
parent655e1af6aecdd960df1fc99020aec3cd4527117b
mptcp: free acked data before waiting for more memory

[ 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 <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mptcp/protocol.c