Skip to content

mptcp: replace lock_sock_fast with sleepable lock

Gang Yan mptcp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mptcp: fix scheduling with atomic in timestamp sockoptnet/mptcp/sockopt.c+4 -41 reply
2/2mptcp: use sockopt_lock(release)_sock in sockoptnet/mptcp/sockopt.c+60 -612 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMatthieu Baerts (NGI0)
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH mptcp-net 0/2] mptcp: replace lock_sock_fast with sleepable lock

From: Gang Yan <[email protected]>

Hi Matt,

I make some progress about the issue sashiko mentioned in:
https://sashiko.dev/#/patchset/[email protected]

The problem does exist,though the trigger conditions seem quite strict.

asdasda shjaksdjh askjd hjklajsdhfj klasjd aklshd kljasldkj akjlsd klklk

I’ve checked how TCP and core socket handle similar sockopt operations, and found they almost always use sockopt_lock_sock() in setsockopt/getsockopt paths — a variant of lock_sock() that also considers BPF cases.

I think we can align MPTCP with a similar approach to fix this properly. This will come as a two-patch series, split for easier review and backporting to stable branches:

- 0001: The first patch replaces lock_sock_fast() with lock_sock() to fix the potential sleeping issue in timestamp and timestamping sockopt handlers.

- 0002: The second patch converts all lock operations in MPTCP setsockopt / getsockopt to use sockopt_lock_sock(), preventing similar issues from being accidentally introduced in the future. And I think it should use 'mptcp-next' tag.

Gang Yan (2):
mptcp: fix scheduling with atomic in timestamp sockopt
mptcp: use sockopt_lock(release)_sock in sockopt

 net/mptcp/sockopt.c | 121 ++++++++++++++++++++++----------------------
 1 file changed, 60 insertions(+), 61 deletions(-)
Signature · 1 line
2.43.0