cmap_find_protected calculated wrong h2 hash which causing entries with duplicated id inserted into the cmap.
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-December/047945.html Signed-off-by: Zang MingJie <[email protected]> --- lib/cmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmap.c b/lib/cmap.c index cb9cd32ab..c9eef3f4a 100644 --- a/lib/cmap.c +++ b/lib/cmap.c @@ -568,7 +568,7 @@ cmap_find_protected(const struct cmap *cmap, uint32_t hash) { struct cmap_impl *impl = cmap_get_impl(cmap); uint32_t h1 = rehash(impl, hash); - uint32_t h2 = other_hash(hash); + uint32_t h2 = other_hash(h1); struct cmap_node *node; node = cmap_find_bucket_protected(impl, hash, h1); -- 2.20.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
