diff options
author | Dmitry Torokhov <dtor@google.com> | 2015-07-09 17:17:57 -0700 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-10-29 01:34:19 +0200 |
commit | 388ebaeb91e8f7c4c1b1f9939924e310fae47bf0 (patch) | |
tree | fcaddedbcbe75eadbbbc2549a142404652f21099 /net/ipv4/tcp.c | |
parent | cbf8bf03ed041a2be4c03859c70899cb7cbadf36 (diff) | |
download | kernel_samsung_tuna-388ebaeb91e8f7c4c1b1f9939924e310fae47bf0.zip kernel_samsung_tuna-388ebaeb91e8f7c4c1b1f9939924e310fae47bf0.tar.gz kernel_samsung_tuna-388ebaeb91e8f7c4c1b1f9939924e310fae47bf0.tar.bz2 |
net: fix iterating over hashtable in tcp_nuke_addr()
The actual size of the tcp hashinfo table is tcp_hashinfo.ehash_mask + 1
so we need to adjust the loop accordingly to get the sockets hashed into
the last bucket.
Change-Id: I796b3c7b4a1a7fa35fba9e5192a4a403eb6e17de
Signed-off-by: Dmitry Torokhov <dtor@google.com>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 4349e46..bf1adbb 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3379,7 +3379,7 @@ int tcp_nuke_addr(struct net *net, struct sockaddr *addr) return -EAFNOSUPPORT; } - for (bucket = 0; bucket < tcp_hashinfo.ehash_mask; bucket++) { + for (bucket = 0; bucket <= tcp_hashinfo.ehash_mask; bucket++) { struct hlist_nulls_node *node; struct sock *sk; spinlock_t *lock = inet_ehash_lockp(&tcp_hashinfo, bucket); |