From: Stephen Hemminger <[email protected]>
Date: Wed, 2 May 2018 10:25:31 -0700
> diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
> index 881ac6d046f2..8a70465c240c 100644
> --- a/net/ipv4/inet_connection_sock.c
> +++ b/net/ipv4/inet_connection_sock.c
> @@ -309,6 +309,7 @@ int inet_csk_get_port(struct sock *sk, unsigned short
> snum)
> net, head, port);
> if (!tb)
> goto fail_unlock;
> + ++head->count;
> tb_found:
> if (!hlist_empty(&tb->owners)) {
> if (sk->sk_reuse == SK_FORCE_REUSE)
Are you really able to commit to the counter increment here? We can still
fail after this point.