Skip to content
Snippets Groups Projects
Commit 39354eb2 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

tcp: tcp_data_ready() must look at SOCK_DONE


My prior cleanup missed that tcp_data_ready() has to look at SOCK_DONE.
Otherwise, an application using SO_RCVLOWAT will not get EPOLLIN event
if a FIN is received in the middle of expected payload.

The reason SOCK_DONE is not examined in tcp_epollin_ready()
is that tcp_poll() catches the FIN because tcp_fin()
is also setting RCV_SHUTDOWN into sk->sk_shutdown

Fixes: 05dc72ab ("tcp: factorize logic into tcp_epollin_ready()")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarWei Wang <weiwan@google.com>
Cc: Arjun Roy <arjunroy@google.com>
Reviewed-by: default avatarWei Wang <weiwan@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ca04422a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment