Skip to contentSkip to conversation

tcp/mptcp: Purge write-queue of the sk not meta_sk in tcp_abort()

PATCH In review Christoph Paasch 2 participants 2 messages May 1, 2018

Subsystems (3)
lore
Share & tools
lore

Christoph Paasch

author
#0 lore raw

PATCH 1/1 tcp/mptcp: Purge write-queue of the sk not meta_sk in tcp_abort()

tcp_abort terminates a specific subflow (e.g., when the interface goes down).

However, in tcp_abort() we should not purge the write-queue of the meta-sk but of the sk that we are removing.

Fixes 16b5a42fd18e ("Merge branch 'net-next/master'")
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 net/ipv4/tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp.c +1 -1
index eaa32600fe63..eeb98619b181 100644
@@ -3932,7 +3932,7 @@ int tcp_abort(struct sock *sk, int err)
 
 	bh_unlock_sock(meta_sk);
 	local_bh_enable();
-	tcp_write_queue_purge(meta_sk);
+	tcp_write_queue_purge(sk);
 	release_sock(meta_sk);
 	return 0;
 }
Signature · 1 line
2.16.2
#1 lore raw
Quoted 27 lines · Christoph Paasch

tcp_abort terminates a specific subflow (e.g., when the interface goes down).

However, in tcp_abort() we should not purge the write-queue of the meta-sk but of the sk that we are removing.

Fixes 16b5a42fd18e ("Merge branch 'net-next/master'")
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>

---
net/ipv4/tcp.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp.c +1 -1
index eaa32600fe63..eeb98619b181 100644
@@ -3932,7 +3932,7 @@ int tcp_abort(struct sock *sk, int err)
 
 	bh_unlock_sock(meta_sk);
 	local_bh_enable();
-	tcp_write_queue_purge(meta_sk);
+	tcp_write_queue_purge(sk);
 	release_sock(meta_sk);
 	return 0;
 }
Signature · 1 line
2.16.2

Thanks for catching that, I've applied the patch.

--
Mat Martineau
Intel OTC