[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1424552111-12077-1-git-send-email-sasha.levin@oracle.com>
Date: Sat, 21 Feb 2015 15:55:11 -0500
From: Sasha Levin <sasha.levin@...cle.com>
To: herbert@...dor.apana.org.au, tgraf@...g.ch
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Sasha Levin <sasha.levin@...cle.com>
Subject: [PATCH] rhashtable: initialize all rhashtable walker members
Commit "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.
Signed-off-by: Sasha Levin <sasha.levin@...cle.com>
---
lib/rhashtable.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 9cc4c4a..030484c 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -894,6 +894,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);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists