aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@google.com>2015-07-09 17:17:57 -0700
committerBrett Rogers <brettrogers11@gmail.com>2016-02-20 14:05:07 -0800
commit289184d8d4ef53fc254449ee99fdcef3b064aedc (patch)
tree3364c16e2552c02e13b2396d9f18cbd62ba0fae4 /net
parent862518ae8df76d87c7e816e272a26ad0a9cb1464 (diff)
downloadkernel_samsung_smdk4412-289184d8d4ef53fc254449ee99fdcef3b064aedc.tar.gz
kernel_samsung_smdk4412-289184d8d4ef53fc254449ee99fdcef3b064aedc.tar.bz2
kernel_samsung_smdk4412-289184d8d4ef53fc254449ee99fdcef3b064aedc.zip
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')
-rw-r--r--net/ipv4/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 96bb1dc28c1..58117bdc548 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);