mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: mptcp@lists.linux.dev
Subject: [PATCH mptcp-next 2/2] mptcp: drop rendundant test in move_skbs_to_msk()
Date: Thu, 27 May 2021 18:53:05 +0200	[thread overview]
Message-ID: <627c15b052e2ecf4a2c6a897a83da7e25db55f32.1622132917.git.pabeni@redhat.com> (raw)
In-Reply-To: <cover.1622132917.git.pabeni@redhat.com>

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 <pabeni@redhat.com>
---
 net/mptcp/protocol.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index a08ea8867716..4ac55e696f52 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_data_lock(sk);
 
 	__mptcp_move_skbs_from_subflow(msk, ssk, &moved);
-- 
2.26.3


  parent reply	other threads:[~2021-05-27 16:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 16:53 [PATCH mptcp-next 0/2] mptcp: some smaller cleanup Paolo Abeni
2021-05-27 16:53 ` [PATCH mptcp-next 1/2] mptcp: don't clear MPTCP_DATA_READY in sk_wait_event() Paolo Abeni
2021-05-27 16:53 ` Paolo Abeni [this message]
2021-05-28  0:19 ` [PATCH mptcp-next 0/2] mptcp: some smaller cleanup Mat Martineau
2021-06-07 15:13 ` Matthieu Baerts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=627c15b052e2ecf4a2c6a897a83da7e25db55f32.1622132917.git.pabeni@redhat.com \
    --to=pabeni@redhat.com \
    --cc=mptcp@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).