mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: mptcp@lists.linux.dev
Cc: Mat Martineau <mathew.j.martineau@linux.intel.com>
Subject: [PATCH mptcp-net 0/3] Locking fixes for subflow flag changes
Date: Tue, 28 Jun 2022 12:03:53 -0700	[thread overview]
Message-ID: <20220628190356.326233-1-mathew.j.martineau@linux.intel.com> (raw)

When working with Kishen on the userspace PM, the locking code in
mptcp_pm_nl_mp_prio_send_ack() caught my attention. The
release-and-reacquire of the PM lock in that function was requiring the
userspace PM code to grab that lock, even though nothing protected by
that lock was being accessed. Patch 1 addresses this.

While investigating that issue, I realized that
mptcp_pm_nl_mp_prio_send_ack() was not holding the subflow socket lock
while modifying several parts of the subflow context. Patch 3 addresses
this, and is not a drastic change since the subflow lock was being
acquired anyway in mptcp_subflow_send_ack(). Patch 2 is a prerequisite
patch adding a __mptcp_subflow_send_ack() helper to use in patch 3 when
the subflow is already locked.

Mat Martineau (3):
  mptcp: Avoid acquiring PM lock for subflow priority changes
  mptcp: Add a variant of mptcp_subflow_send_ack() for locked subflows
  mptcp: Acquire the subflow socket lock before modifying MP_PRIO flags

 net/mptcp/pm_netlink.c | 11 ++++++-----
 net/mptcp/protocol.c   |  9 +++++++--
 net/mptcp/protocol.h   |  1 +
 3 files changed, 14 insertions(+), 7 deletions(-)

-- 
2.37.0


             reply	other threads:[~2022-06-28 19:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 19:03 Mat Martineau [this message]
2022-06-28 19:03 ` [PATCH mptcp-net 1/3] mptcp: Avoid acquiring PM lock for subflow priority changes Mat Martineau
2022-06-29 19:57   ` Paolo Abeni
2022-06-28 19:03 ` [PATCH mptcp-net 2/3] mptcp: Add a variant of mptcp_subflow_send_ack() for locked subflows Mat Martineau
2022-06-28 19:03 ` [PATCH mptcp-net 3/3] mptcp: Acquire the subflow socket lock before modifying MP_PRIO flags Mat Martineau
2022-06-28 20:50   ` mptcp: Acquire the subflow socket lock before modifying MP_PRIO flags: Tests Results MPTCP CI
2022-06-29 19:59   ` [PATCH mptcp-net 3/3] mptcp: Acquire the subflow socket lock before modifying MP_PRIO flags Paolo Abeni
2022-06-29 20:51     ` 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=20220628190356.326233-1-mathew.j.martineau@linux.intel.com \
    --to=mathew.j.martineau@linux.intel.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).