[PATCH mptcp-net 0/3] Locking fixes for subflow flag changes

Mat Martineau posted 3 patches 1 year, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20220628190356.326233-1-mathew.j.martineau@linux.intel.com
Maintainers: Mat Martineau <mathew.j.martineau@linux.intel.com>, Jakub Kicinski <kuba@kernel.org>, Eric Dumazet <edumazet@google.com>, "David S. Miller" <davem@davemloft.net>, Geliang Tang <geliangtang@gmail.com>, Matthieu Baerts <matthieu.baerts@tessares.net>, Paolo Abeni <pabeni@redhat.com>
There is a newer version of this series
net/mptcp/pm_netlink.c | 11 ++++++-----
net/mptcp/protocol.c   |  9 +++++++--
net/mptcp/protocol.h   |  1 +
3 files changed, 14 insertions(+), 7 deletions(-)
[PATCH mptcp-net 0/3] Locking fixes for subflow flag changes
Posted by Mat Martineau 1 year, 10 months ago
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