On 2/13/24 09:32, Adrian Moreno wrote:


On 2/9/24 17:17, Ilya Maximets wrote:
For some reason annotation is made for a read-lock, while all the
callers are correctly holding a write-lock.

Fixes: 05df16238d43 ("ofproto/bond: Fix bond post recirc rule leak.")
Signed-off-by: Ilya Maximets <i.maxim...@ovn.org>
---
  ofproto/bond.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ofproto/bond.c b/ofproto/bond.c
index cfdf44f85..c4b3a4a45 100644
--- a/ofproto/bond.c
+++ b/ofproto/bond.c
@@ -423,7 +423,7 @@ update_recirc_rules__(struct bond *bond)
  static void
  update_recirc_rules(struct bond *bond)
-    OVS_REQ_RDLOCK(rwlock)
+    OVS_REQ_WRLOCK(rwlock)
  {
      update_recirc_rules__(bond);
  }

Looks good to me.

Acked-by: Adrian Moreno <amore...@redhat.com>

Sorry, thought of something after sending the ack.

If, as we're discussing in [1], we lock the global mutex in bond_unref(), there should not be any reason to keep the lock-less version of this function (update_recirc_rules__()) so we could fold both functions together.

Unless you see a reason not to backport [1] to the same degree as this patch, I could merge this patch with my v2 of [1].

WDYT?

[1] https://patchwork.ozlabs.org/project/openvswitch/patch/20240209070642.2412417-1-amore...@redhat.com/

--
Adrián Moreno

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to