mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Matthieu Baerts <matthieu.baerts@tessares.net>
To: Paolo Abeni <pabeni@redhat.com>, mptcp@lists.linux.dev
Subject: Re: [PATCH v2 mptcp-net] mptcp: avoid race on msk state changes
Date: Sat, 19 Jun 2021 09:03:30 +0200	[thread overview]
Message-ID: <097a9678-f576-00ed-9529-44167c86055c@tessares.net> (raw)
In-Reply-To: <a96e100aa429a9bb947a2b22cc16682649c93550.1623949487.git.pabeni@redhat.com>

Hi Paolo, Mat,

On 17/06/2021 19:05, Paolo Abeni wrote:
> The msk socket state is currently updated in a few spots without
> owning the msk socket lock itself.
> 
> Some of such operations are safe, as they happens before exposing
> the msk socket to user-space and can't race with other changes.
> 
> A couple of them, at connect time, can actually race with close()
> or shutdown(), leaving breaking the socket state machine.
> 
> This change addresses the issue moving such update under the msk
> socket lock with the usual:
> 
> <acquire spinlock>
> <check sk lock onwers>
> <ev defer to release_cb>
> 
> scheme.
> 
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/56
> Fixes: 8fd738049ac3 ("mptcp: fallback in case of simultaneous connect")
> Fixes: c3c123d16c0e ("net: mptcp: don't hang in mptcp_sendmsg() after TCP fallbac")

(I added a "k" at the end)

> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Thank you for the patch and the review!

Now in our tree -- "fixes for net" -- with Mat's RvB tag:

- fa35d78a9419: mptcp: avoid race on msk state changes
- Results: 1aa8d1f89a86..43a335a6d44d

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20210619T070308
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export/20210619T070308

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

      parent reply	other threads:[~2021-06-19  7:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 17:05 Paolo Abeni
2021-06-17 18:50 ` Mat Martineau
2021-06-19  7:03 ` Matthieu Baerts [this message]

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=097a9678-f576-00ed-9529-44167c86055c@tessares.net \
    --to=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --subject='Re: [PATCH v2 mptcp-net] mptcp: avoid race on msk state changes' \
    /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

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).