mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH mptcp-net v3 0/2] Locking fixes for subflow flag changes
@ 2022-06-29 22:53 Mat Martineau
  2022-06-29 22:53 ` [PATCH mptcp-net v3 1/2] mptcp: Avoid acquiring PM lock for subflow priority changes Mat Martineau
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mat Martineau @ 2022-06-29 22:53 UTC (permalink / raw)
  To: mptcp, pabeni; +Cc: Mat Martineau

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 2 addresses
this, and is not a drastic change since the subflow lock was being
acquired anyway in mptcp_subflow_send_ack().

v2->v3: Fix build error

v1->v2: Based on Paolo's feedback, fix MIB issue with atomic context in
patch 1 (tested with CONFIG_PREEMPT), and squash patches 2 & 3.


Mat Martineau (2):
  mptcp: Avoid acquiring PM lock for subflow priority changes
  mptcp: Acquire the subflow socket lock before modifying MP_PRIO flags

 net/mptcp/options.c    |  3 +++
 net/mptcp/pm_netlink.c | 13 ++++++-------
 net/mptcp/protocol.c   |  9 +++++++--
 net/mptcp/protocol.h   |  1 +
 4 files changed, 17 insertions(+), 9 deletions(-)

-- 
2.37.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-30 17:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 22:53 [PATCH mptcp-net v3 0/2] Locking fixes for subflow flag changes Mat Martineau
2022-06-29 22:53 ` [PATCH mptcp-net v3 1/2] mptcp: Avoid acquiring PM lock for subflow priority changes Mat Martineau
2022-06-29 22:53 ` [PATCH mptcp-net v3 2/2] mptcp: Acquire the subflow socket lock before modifying MP_PRIO flags Mat Martineau
2022-06-30  0:44   ` mptcp: Acquire the subflow socket lock before modifying MP_PRIO flags: Tests Results MPTCP CI
2022-06-30 16:18 ` [PATCH mptcp-net v3 0/2] Locking fixes for subflow flag changes Paolo Abeni
2022-06-30 17:39 ` Matthieu Baerts

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