Skip to contentSkip to conversation

tcp: remove extra POLL_OUT added for finished active connect()

PATCH Applied Neal Cardwell 3 participants 3 messages Aug 2, 2017 – Aug 3, 2017

Subsystems (3)
lore
Share & tools
lore

Neal Cardwell

author maintainer
#0 lore raw

PATCH 1/1 tcp: remove extra POLL_OUT added for finished active connect()

Commit 45f119bf936b ("tcp: remove header prediction") introduced a minor bug: the sk_state_change() and sk_wake_async() notifications for a completed active connection happen twice: once in this new spot inside tcp_finish_connect() and once in the existing code in tcp_rcv_synsent_state_process() immediately after it calls tcp_finish_connect(). This commit remoes the duplicate POLL_OUT notifications.

Fixes 45f119bf936b ("tcp: remove header prediction")
Cc Florian Westphal <[email protected]>
Cc Eric Dumazet <[email protected]>
Cc Yuchung Cheng <[email protected]>
---
 net/ipv4/tcp_input.c | 5 -----
 1 file changed, 5 deletions(-)
net/ipv4/tcp_input.c +0 -5
index df670d7ed98d..99cdf4ccabb8 100644
@@ -5342,11 +5342,6 @@ void tcp_finish_connect(struct sock *sk, struct sk_buff *skb)
 
 	if (sock_flag(sk, SOCK_KEEPOPEN))
 		inet_csk_reset_keepalive_timer(sk, keepalive_time_when(tp));
-
-	if (!sock_flag(sk, SOCK_DEAD)) {
-		sk->sk_state_change(sk);
-		sk_wake_async(sk, SOCK_WAKE_IO, POLL_OUT);
-	}
 }
 
 static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack,
Signature · 1 line
2.14.0.rc1.383.gd1ce394fe2-goog
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Neal Cardwell

Commit 45f119bf936b ("tcp: remove header prediction") introduced a minor bug: the sk_state_change() and sk_wake_async() notifications for a completed active connection happen twice: once in this new spot inside tcp_finish_connect() and once in the existing code in tcp_rcv_synsent_state_process() immediately after it calls tcp_finish_connect(). This commit remoes the duplicate POLL_OUT notifications.

Quoted 8 lines
Fixes 45f119bf936b ("tcp: remove header prediction")
Cc Florian Westphal <[email protected]>
Cc Eric Dumazet <[email protected]>
Cc Yuchung Cheng <[email protected]>
---
 net/ipv4/tcp_input.c | 5 -----
 1 file changed, 5 deletions(-)
maintainer Applied
#2 lore raw
In reply to Neal Cardwell

From: Neal Cardwell <[email protected]>
Date: Wed, 2 Aug 2017 15:59:58 -0400

Quoted 10 lines

Commit 45f119bf936b ("tcp: remove header prediction") introduced a minor bug: the sk_state_change() and sk_wake_async() notifications for a completed active connection happen twice: once in this new spot inside tcp_finish_connect() and once in the existing code in tcp_rcv_synsent_state_process() immediately after it calls tcp_finish_connect(). This commit remoes the duplicate POLL_OUT notifications.

Fixes 45f119bf936b ("tcp: remove header prediction")

Applied, thanks.