aboutsummaryrefslogtreecommitdiffstats
path: root/net/mptcp/token_test.c
diff options
context:
space:
mode:
authorDavid S. Miller <[email protected]>2023-01-09 07:30:50 +0000
committerDavid S. Miller <[email protected]>2023-01-09 07:30:50 +0000
commit762405e3ce45ed42b711f6d7677d0f797231571c (patch)
tree37deff151d04b6680ec2d30cf2e92763642c73d4 /net/mptcp/token_test.c
parentusbnet: optimize usbnet_bh() to reduce CPU load (diff)
parentselftest: mptcp: add test for mptcp socket in use (diff)
downloadkernel-762405e3ce45ed42b711f6d7677d0f797231571c.tar.gz
kernel-762405e3ce45ed42b711f6d7677d0f797231571c.zip
Merge branch 'mptcp-next'
Mat Martineau says: ==================== mptcp: Protocol in-use tracking and code cleanup Here's a collection of commits from the MPTCP tree: Patches 1-4 and 6 contain miscellaneous code cleanup for more consistent use of helper functions, existing local variables, and better naming. Patches 5, 7, and 9 add sock_prot_inuse tracking for MPTCP and an associated self test. Patch 8 modifies the mptcp_connect self test tool to exit on SIGUSR1 when in "slow mode". ==================== Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/mptcp/token_test.c')
-rw-r--r--net/mptcp/token_test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mptcp/token_test.c b/net/mptcp/token_test.c
index 5d984bec1cd8..0758865ab658 100644
--- a/net/mptcp/token_test.c
+++ b/net/mptcp/token_test.c
@@ -57,6 +57,9 @@ static struct mptcp_sock *build_msk(struct kunit *test)
KUNIT_EXPECT_NOT_ERR_OR_NULL(test, msk);
refcount_set(&((struct sock *)msk)->sk_refcnt, 1);
sock_net_set((struct sock *)msk, &init_net);
+
+ /* be sure the token helpers can dereference sk->sk_prot */
+ ((struct sock *)msk)->sk_prot = &tcp_prot;
return msk;
}