summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2015-02-23 04:35:06 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-23 15:23:19 -0500
commit71bb0012c38fbd090a56b3cb96e9f626c415d264 (patch)
tree9c80e83770cfe40973b784b2939eefe86a9b8586 /lib
parent85689b24c539133d05022942e986df78e9bcfae1 (diff)
downloadlinux-71bb0012c38fbd090a56b3cb96e9f626c415d264.tar.gz
linux-71bb0012c38fbd090a56b3cb96e9f626c415d264.tar.bz2
linux-71bb0012c38fbd090a56b3cb96e9f626c415d264.zip
rhashtable: initialize all rhashtable walker members
Commit f2dba9c6ff ("rhashtable: Introduce rhashtable_walk_*") forgot to initialize the members of struct rhashtable_walker after allocating it, which caused an undefined value for 'resize' which is used later on. Fixes: f2dba9c6ff ("rhashtable: Introduce rhashtable_walk_*") Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/rhashtable.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index b41a5c09832a..e3a04e4b3ec5 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -903,6 +903,9 @@ int rhashtable_walk_init(struct rhashtable *ht, struct rhashtable_iter *iter)
if (!iter->walker)
return -ENOMEM;
+ INIT_LIST_HEAD(&iter->walker->list);
+ iter->walker->resize = false;
+
mutex_lock(&ht->mutex);
list_add(&iter->walker->list, &ht->walkers);
mutex_unlock(&ht->mutex);