]> www.infradead.org Git - users/dwmw2/linux.git/commit
tcp: Check hlist_empty(&tb->bhash2) instead of hlist_empty(&tb->owners).
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 19 Dec 2023 00:18:30 +0000 (09:18 +0900)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Dec 2023 22:15:35 +0000 (22:15 +0000)
commit8002d44fe84dd7b98812aadcbc1bd897e270355c
tree90af38c04d00d50b9d47edf7a3dcfc9cbf9b0c9b
parentb82ba728ccfecb4cee518199597598ef385b47d5
tcp: Check hlist_empty(&tb->bhash2) instead of hlist_empty(&tb->owners).

We use hlist_empty(&tb->owners) to check if the bhash bucket has a socket.
We can check the child bhash2 buckets instead.

For this to work, the bhash2 bucket must be freed before the bhash bucket.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_connection_sock.c
net/ipv4/inet_hashtables.c
net/ipv4/inet_timewait_sock.c