From: YAMAMOTO Takashi Date: Mon, 12 Aug 2013 23:00:05 +0000 (+0900) Subject: ofproto: make oftable_remove_rule__ release evict lock X-Git-Tag: v2.0~200 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=c278bb82a36c9a479b611dfa8482c3c23cca633e;p=cascardo%2Fovs.git 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 --- 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