From: YAMAMOTO Takashi <y...@mwd.biglobe.ne.jp>

according to the OVS_RELEASES annotation, oftable_remove_rule__ is
expected to release rule->evict lock.  make it actually do so.

this fixes pthread_rwlock_destroy failures observed on NetBSD,
where destroying a held lock, which is specwise undefined behaviour,
actually fails.  i guess it doesn't fail on linux but it's better
not to rely on an undefined behavior.

Signed-off-by: YAMAMOTO Takashi <y...@mwd.biglobe.ne.jp>
---
 ofproto/ofproto.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index c7fc09b..44a6f9d 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -5475,6 +5475,7 @@ oftable_remove_rule__(struct ofproto *ofproto, struct 
classifier *cls,
     if (!list_is_empty(&rule->meter_list_node)) {
         list_remove(&rule->meter_list_node);
     }
+    ovs_rwlock_unlock(&rule->evict);
 }
 
 static void
-- 
1.8.3.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to