lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADVnQymbDMHMUxGyy5jequ6iEzL+eFSAR0p+wRk0WGrsjNFs8A@mail.gmail.com>
Date:   Fri, 31 Jan 2020 14:48:33 -0500
From:   Neal Cardwell <ncardwell@...gle.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Martin KaFai Lau <kafai@...com>,
        Yuchung Cheng <ycheng@...gle.com>
Subject: Re: [PATCH net] tcp: clear tp->data_segs{in|out} in tcp_disconnect()

On Fri, Jan 31, 2020 at 1:32 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> tp->data_segs_in and tp->data_segs_out need to be cleared
> in tcp_disconnect().
>
> tcp_disconnect() is rarely used, but it is worth fixing it.
>
> Fixes: a44d6eacdaf5 ("tcp: Add RFC4898 tcpEStatsPerfDataSegsOut/In")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Martin KaFai Lau <kafai@...com>
> Cc: Yuchung Cheng <ycheng@...gle.com>
> Cc: Neal Cardwell <ncardwell@...gle.com>
> ---
>  net/ipv4/tcp.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index a8ffdfb61f422228d4af1de600b756c9d3894ef5..3b601823f69a93dd20f9a4876945a87cd2196dc9 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -2643,6 +2643,8 @@ int tcp_disconnect(struct sock *sk, int flags)
>         tp->bytes_acked = 0;
>         tp->bytes_received = 0;
>         tp->bytes_retrans = 0;
> +       tp->data_segs_in = 0;
> +       tp->data_segs_out = 0;
>         tp->duplicate_sack[0].start_seq = 0;
>         tp->duplicate_sack[0].end_seq = 0;
>         tp->dsack_dups = 0;
> --

Thanks, Eric!

Acked-by: Neal Cardwell <ncardwell@...gle.com>

neal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ