* [PATCH resend] rhashtable: initialize all rhashtable walker members
@ 2015-02-23 9:35 Sasha Levin
2015-02-23 20:23 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2015-02-23 9:35 UTC (permalink / raw)
To: herbert, tgraf; +Cc: netdev, linux-kernel, Sasha Levin
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>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH resend] rhashtable: initialize all rhashtable walker members
2015-02-23 9:35 [PATCH resend] rhashtable: initialize all rhashtable walker members Sasha Levin
@ 2015-02-23 20:23 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-02-23 20:23 UTC (permalink / raw)
To: sasha.levin; +Cc: herbert, tgraf, netdev, linux-kernel
From: Sasha Levin <sasha.levin@oracle.com>
Date: Mon, 23 Feb 2015 04:35:06 -0500
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-23 20:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 9:35 [PATCH resend] rhashtable: initialize all rhashtable walker members Sasha Levin
2015-02-23 20:23 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®