subflow: don't increment msk refcount on join connect completion
Subsystems (2)
Florian Westphal
PATCH 1/1 subflow: don't increment msk refcount on join connect completion
squashto: mptcp: Add handling of outgoing MP_JOIN requests
The connecting socket already has a refcount, this additional increase is never decremented, resulting in the mptcp socket to never get freed.
--- net/mptcp/subflow.c | 1 - 1 file changed, 1 deletion(-)
net/mptcp/subflow.c +0 -1
@@ -38,7 +38,6 @@ static int subflow_rebuild_header(struct sock *sk) err =mptcp_token_new_connect (sk); }else if (subflow->request_join && !subflow->local_nonce) {pr_debug ("subflow=%p" , sk); -mptcp_token_get_sock (subflow->token); do { get_random_bytes(&subflow->local_nonce, sizeof(u32));
Signature · 1 line
2.23.0
Paolo Abeni
Quoted 15 lines · Florian Westphal
squashto: mptcp: Add handling of outgoing
MP_JOINrequestsThe connecting socket already has a refcount, this additional increase is never decremented, resulting in the mptcp socket to never get freed.
Signed-off-by Florian Westphal <fw(a)strlen.de>--- net/mptcp/subflow.c | 1 - 1 file changed, 1 deletion(-)net/mptcp/subflow.c +0
-0
net/mptcp/subflow.c static int subflow_rebuild_header(struct sock *sk) · line 43
Quoted 7 lines
net/mptcp/subflow.c +0
-1@@ -38,7 +38,6 @@ static int subflow_rebuild_header(struct sock *sk) err =mptcp_token_new_connect (sk); }else if (subflow->request_join && !subflow->local_nonce) {pr_debug ("subflow=%p" , sk); -mptcp_token_get_sock (subflow->token); do { get_random_bytes(&subflow->local_nonce, sizeof(u32));
yep, it looks like this refcnt is really leaked, ACK!
Paolo
Matthieu Baerts
Hi Florian, Paolo,
Quoted 21 lines · Paolo Abeni
Quoted 20 lines · Florian Westphal
squashto: mptcp: Add handling of outgoing
MP_JOINrequestsThe connecting socket already has a refcount, this additional increase is never decremented, resulting in the mptcp socket to never get freed.
Signed-off-by Florian Westphal <fw(a)strlen.de>--- net/mptcp/subflow.c | 1 - 1 file changed, 1 deletion(-)net/mptcp/subflow.c +0
-1@@ -38,7 +38,6 @@ static int subflow_rebuild_header(struct sock *sk) err =mptcp_token_new_connect (sk); }else if (subflow->request_join && !subflow->local_nonce) {pr_debug ("subflow=%p" , sk); -mptcp_token_get_sock (subflow->token);
Quoted 4 lines
net/mptcp/subflow.c static int subflow_rebuild_header(struct sock *sk) · line 43
Quoted 2 lines
net/mptcp/subflow.c +0
-0do { get_random_bytes(&subflow->local_nonce, sizeof(u32));yep, it looks like this refcnt is really leaked, ACK!
Good catch! Thank you for the patch and the review!
- 8aa42d827a74: "squashed" in "mptcp: Add handling of outgoing MP_JOIN requests"
- 4d53ef252ed5..3af80e92c8cd: result
Tests and sync in progress.
Cheers,
Matt
Signature · 5 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium