• C
    tcp: fix tcp_cleanup_rbuf() for tcp_read_skb() · c457985a
    Cong Wang 提交于
    tcp_cleanup_rbuf() retrieves the skb from sk_receive_queue, it
    assumes the skb is not yet dequeued. This is no longer true for
    tcp_read_skb() case where we dequeue the skb first.
    
    Fix this by introducing a helper __tcp_cleanup_rbuf() which does
    not require any skb and calling it in tcp_read_skb().
    
    Fixes: 04919bed ("tcp: Introduce tcp_read_skb()")
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: John Fastabend <john.fastabend@gmail.com>
    Cc: Jakub Sitnicki <jakub@cloudflare.com>
    Signed-off-by: NCong Wang <cong.wang@bytedance.com>
    Signed-off-by: NJakub Kicinski <kuba@kernel.org>
    c457985a
tcp.c 125.3 KB