diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 2a658c2c8903..fe3cdeddd097 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2158,13 +2158,15 @@ skip_copy: tp->urg_data = 0; tcp_fast_path_check(sk); } - if (used + offset < skb->len) - continue; if (TCP_SKB_CB(skb)->has_rxtstamp) { tcp_update_recv_tstamps(skb, &tss); cmsg_flags |= 2; } + + if (used + offset < skb->len) + continue; + if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) goto found_fin_ok; if (!(flags & MSG_PEEK))