Skip to content

Commit b5abbf6

Browse files
committed
Merge branch 'mptcp-sched-fix-some-lock-issues'
Matthieu Baerts says: ==================== mptcp: sched: fix some lock issues Two small fixes related to the MPTCP packets scheduler: - Patch 1: add missing rcu_read_(un)lock(). A fix for >= 6.6. And some modifications in the MPTCP selftests: - Patch 2: a small addition to the MPTCP selftests to cover more code. ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents b935252 + 5513dc1 commit b5abbf6

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

net/mptcp/protocol.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2864,8 +2864,10 @@ static int mptcp_init_sock(struct sock *sk)
28642864
if (unlikely(!net->mib.mptcp_statistics) && !mptcp_mib_alloc(net))
28652865
return -ENOMEM;
28662866

2867+
rcu_read_lock();
28672868
ret = mptcp_init_sched(mptcp_sk(sk),
28682869
mptcp_sched_find(mptcp_get_scheduler(net)));
2870+
rcu_read_unlock();
28692871
if (ret)
28702872
return ret;
28712873

tools/testing/selftests/net/mptcp/mptcp_connect.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,15 @@ check_mptcp_disabled()
259259
mptcp_lib_ns_init disabled_ns
260260

261261
print_larger_title "New MPTCP socket can be blocked via sysctl"
262+
263+
# mainly to cover more code
264+
if ! ip netns exec ${disabled_ns} sysctl net.mptcp >/dev/null; then
265+
mptcp_lib_pr_fail "not able to list net.mptcp sysctl knobs"
266+
mptcp_lib_result_fail "not able to list net.mptcp sysctl knobs"
267+
ret=${KSFT_FAIL}
268+
return 1
269+
fi
270+
262271
# net.mptcp.enabled should be enabled by default
263272
if [ "$(ip netns exec ${disabled_ns} sysctl net.mptcp.enabled | awk '{ print $3 }')" -ne 1 ]; then
264273
mptcp_lib_pr_fail "net.mptcp.enabled sysctl is not 1 by default"

0 commit comments

Comments
 (0)