All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw at strlen.de>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [PATCH] mptcp: Protect subflow socket options before connection completes
Date: Mon, 10 Feb 2020 12:52:21 +0100	[thread overview]
Message-ID: <20200210115221.GG2991@breakpoint.cc> (raw)
In-Reply-To: 20200207211055.78411-1-mathew.j.martineau@linux.intel.com

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]

Mat Martineau <mathew.j.martineau(a)linux.intel.com> wrote:
> Userspace should not be able to directly manipulate subflow socket
> options before a connection is established since it is not yet known if
> it will be an MPTCP subflow or a TCP fallback subflow. TCP fallback
> subflows can be more directly controlled by userspace because they are
> regular TCP connections, while MPTCP subflow sockets need to be
> configured for the specific needs of MPTCP. Use the same logic as
> sendmsg/recvmsg to ensure that socket option calls are only passed
> through to known TCP fallback subflows.
> 
> Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
> ---
> 
> One other question: is it racy to have __mptcp_tcp_fallback() return an
> unlocked msk, then do the sock_hold(ssk) from an unlocked state?

Yes.

> It seems like if holding the ssk reference count is necessary at all it
> should be done while the msk is still locked. I'm considering a change
> to __mptcp_tcp_fallback() to have it not release the msk lock and
> instead have all the callers do that.

Yes, that seems like the right thing to do.

             reply	other threads:[~2020-02-10 11:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 11:52 Florian Westphal [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-12 20:06 [MPTCP] Re: [PATCH] mptcp: Protect subflow socket options before connection completes Davide Caratti
2020-02-12 10:33 Davide Caratti
2020-02-12 10:02 Matthieu Baerts
2020-02-12  9:39 Davide Caratti
2020-02-11 18:17 Mat Martineau
2020-02-11 17:42 Paolo Abeni
2020-02-11  0:44 Mat Martineau
2020-02-10 13:43 Paolo Abeni
2020-02-07 21:13 Mat Martineau

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=20200210115221.GG2991@breakpoint.cc \
    --to=unknown@example.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.