From c278bb82a36c9a479b611dfa8482c3c23cca633e Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Tue, 13 Aug 2013 08:00:05 +0900 Subject: [PATCH] ofproto: make oftable_remove_rule__ release evict lock 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 Signed-off-by: Ben Pfaff --- ofproto/ofproto.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index c7fc09bc1..44a6f9d2b 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 -- 2.20.1