aboutsummaryrefslogtreecommitdiffstats
path: root/net/mptcp/protocol.c
diff options
context:
space:
mode:
authorPaolo Abeni <[email protected]>2021-06-21 22:54:36 +0000
committerDavid S. Miller <[email protected]>2021-06-22 16:57:45 +0000
commit8cfc47fc2eb0fd2d6eaa9e4b23b4bf6ef1bfaeef (patch)
treef849faaff47a43151ae2729b6139079ddabdeaa6 /net/mptcp/protocol.c
parentmptcp: don't clear MPTCP_DATA_READY in sk_wait_event() (diff)
downloadkernel-8cfc47fc2eb0fd2d6eaa9e4b23b4bf6ef1bfaeef.tar.gz
kernel-8cfc47fc2eb0fd2d6eaa9e4b23b4bf6ef1bfaeef.zip
mptcp: drop redundant test in move_skbs_to_msk()
Currently we check the msk state to avoid enqueuing new skbs at msk shutdown time. Such test is racy - as we can't acquire the msk socket lock - and useless, as the caller already checked the subflow field 'disposable', covering the same scenario in a race free manner - read and updated under the ssk socket lock. Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/mptcp/protocol.c')
-rw-r--r--net/mptcp/protocol.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 3e088e9d20fd..cf75be02eb00 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -686,9 +686,6 @@ static bool move_skbs_to_msk(struct mptcp_sock *msk, struct sock *ssk)
struct sock *sk = (struct sock *)msk;
unsigned int moved = 0;
- if (inet_sk_state_load(sk) == TCP_CLOSE)
- return false;
-
__mptcp_move_skbs_from_subflow(msk, ssk, &moved);
__mptcp_ofo_queue(msk);
if (unlikely(ssk->sk_err)) {