From: Paolo Abeni Date: Mon, 21 Jun 2021 22:54:36 +0000 (-0700) Subject: mptcp: drop redundant test in move_skbs_to_msk() X-Git-Tag: v5.15~843^2~68^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8cfc47fc2eb0fd2d6eaa9e4b23b4bf6ef1bfaeef;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Mat Martineau Signed-off-by: David S. Miller --- diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 3e088e9..cf75be0 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)) {