All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] tcp: remove extra POLL_OUT added for finished active connect()
@ 2017-08-02 19:59 Neal Cardwell
  2017-08-02 20:56 ` Eric Dumazet
  2017-08-03 16:31 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Neal Cardwell @ 2017-08-02 19:59 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, Neal Cardwell, Florian Westphal, Eric Dumazet, Yuchung Cheng

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")
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Cc: Florian Westphal <fw@strlen.de>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
---
 net/ipv4/tcp_input.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index df670d7ed98d..99cdf4ccabb8 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -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,
-- 
2.14.0.rc1.383.gd1ce394fe2-goog

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] tcp: remove extra POLL_OUT added for finished active connect()
  2017-08-02 19:59 [PATCH net-next] tcp: remove extra POLL_OUT added for finished active connect() Neal Cardwell
@ 2017-08-02 20:56 ` Eric Dumazet
  2017-08-03 16:31 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2017-08-02 20:56 UTC (permalink / raw)
  To: Neal Cardwell
  Cc: David Miller, netdev, Florian Westphal, Eric Dumazet, Yuchung Cheng

On Wed, 2017-08-02 at 15:59 -0400, Neal Cardwell wrote:
> 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")
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
> Cc: Florian Westphal <fw@strlen.de>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Yuchung Cheng <ycheng@google.com>
> ---
>  net/ipv4/tcp_input.c | 5 -----
>  1 file changed, 5 deletions(-)

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] tcp: remove extra POLL_OUT added for finished active connect()
  2017-08-02 19:59 [PATCH net-next] tcp: remove extra POLL_OUT added for finished active connect() Neal Cardwell
  2017-08-02 20:56 ` Eric Dumazet
@ 2017-08-03 16:31 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-08-03 16:31 UTC (permalink / raw)
  To: ncardwell; +Cc: netdev, fw, edumazet, ycheng

From: Neal Cardwell <ncardwell@google.com>
Date: Wed,  2 Aug 2017 15:59:58 -0400

> 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")
> Signed-off-by: Neal Cardwell <ncardwell@google.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-03 16:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-02 19:59 [PATCH net-next] tcp: remove extra POLL_OUT added for finished active connect() Neal Cardwell
2017-08-02 20:56 ` Eric Dumazet
2017-08-03 16:31 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.