summaryrefslogtreecommitdiffstats
path: root/net/mptcp/protocol.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-02-12 15:59:56 -0800
committerDavid S. Miller <davem@davemloft.net>2021-02-12 16:31:45 -0800
commit40947e13997a1cba4e875893ca6e5d5e61a0689d (patch)
treeb354326e4e413936abf9600bdeb6ac01ad55645e /net/mptcp/protocol.c
parenta141e02e393370e082b25636401c49978b61bfcf (diff)
downloadlinux-40947e13997a1cba4e875893ca6e5d5e61a0689d.tar.bz2
mptcp: schedule worker when subflow is closed
When remote side closes a subflow we should schedule the worker to dispose of the subflow in a timely manner. Otherwise, SF_CLOSED event won't be generated until the mptcp socket itself is closing or local side is closing another subflow. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/protocol.c')
-rw-r--r--net/mptcp/protocol.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 3fd8aef979a3..267c5521692d 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -2170,6 +2170,10 @@ static void __mptcp_close_subflow(struct mptcp_sock *msk)
if (inet_sk_state_load(ssk) != TCP_CLOSE)
continue;
+ /* 'subflow_data_ready' will re-sched once rx queue is empty */
+ if (!skb_queue_empty_lockless(&ssk->sk_receive_queue))
+ continue;
+
mptcp_close_ssk((struct sock *)msk, ssk, subflow);
}
}