From 5c09b672114fab2357c8ce71d608d486eb5ae1ae Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Tue, 22 Apr 2014 10:18:02 -0700 Subject: [PATCH] ofproto: Don't destroy mutex before its use. Currently, we are calling guarded_list_destroy() to destroy a mutex and then go ahead and use it through delete_group ->delete_group__ ->handle_flow_mod__ ->run_rule_executes ->guarded_list_pop_all The group related unit tests cause ovs-vswitchd to crash because of this (on windows). Calling guarded_list_destroy() after delete_group() solves the problem. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- ofproto/ofproto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 659990ecf..49444c193 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1311,9 +1311,9 @@ ofproto_destroy__(struct ofproto *ofproto) ovs_assert(list_is_empty(&ofproto->pending)); destroy_rule_executes(ofproto); - guarded_list_destroy(&ofproto->rule_executes); - delete_group(ofproto, OFPG_ALL); + + guarded_list_destroy(&ofproto->rule_executes); ovs_rwlock_destroy(&ofproto->groups_rwlock); hmap_destroy(&ofproto->groups); -- 2.43.0