From: Florian Westphal <fw at strlen.de>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [PATCH 2/9] mptcp: fix race from mptcp_close/mptcp join
Date: Mon, 02 Dec 2019 14:29:22 +0100 [thread overview]
Message-ID: <20191202132922.GM795@breakpoint.cc> (raw)
In-Reply-To: 4b1827db5dae62d9f75899c1951fce56edffb5e4.camel@redhat.com
[-- Attachment #1: Type: text/plain, Size: 682 bytes --]
Paolo Abeni <pabeni(a)redhat.com> wrote:
> > + /* mptcp socket already closing? */
> > + if (parent->sk_state != TCP_ESTABLISHED)
> > + goto out;
> > +
> > + ret = true;
> > list_add_tail(&subflow->node, &msk->conn_list);
>
>
> This relies on mptcp_close() setting msk status before acquiring the
> msk socket lock, right? If so perhaps we can add a comment there to
> document the locking schema?
No, if mptcp_close would set its state after acquiring the lock this
will still work, either the above check triggers (mptcp_close already
finished) or mptcp_close is still blocked on the lock.
The second case is no different from "mptcp_close was not called".
next reply other threads:[~2019-12-02 13:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-02 13:29 Florian Westphal [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-12-02 14:38 [MPTCP] Re: [PATCH 2/9] mptcp: fix race from mptcp_close/mptcp join Paolo Abeni
2019-12-02 12:10 Paolo Abeni
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=20191202132922.GM795@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.