revalidate_sweep__() has two cases where it calls ukey_delete() to remove a ukey from the umap via cmap_remove(). The first case is a direct call to ukey_delete(), when !flow_exists. The second case is an indirect call via push_ukey_ops(), when result != UKEY_KEEP. If both of these conditions are simultaneously true, however, the code would call ukey_delete() twice, causing an assertion failure in the second call. This commit fixes the problem by eliminating one of the calls.
Reported-by: Keith Holleman <keith.holle...@gmail.com> Reported-at: http://openvswitch.org/pipermail/discuss/2015-December/019772.html CC: Joe Stringer <j...@ovn.org> VMware-BZ: #1579057 Signed-off-by: Ben Pfaff <b...@ovn.org> --- ofproto/ofproto-dpif-upcall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index cd8a9f0..ca25701 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc. +/* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -2274,7 +2274,7 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) n_ops = 0; } - if (!flow_exists) { + if (result == UKEY_KEEP && !flow_exists) { ovs_mutex_lock(&umap->mutex); ukey_delete(umap, ukey); ovs_mutex_unlock(&umap->mutex); -- 2.1.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev