ofproto-dpif: Do not allow recirc_id freed by non-owning ofproto.
[cascardo/ovs.git] / ofproto / ofproto-dpif.c
index b5fe73f..c92931d 100644 (file)
@@ -5459,11 +5459,8 @@ ofproto_dpif_free_recirc_id(struct ofproto_dpif *ofproto, uint32_t recirc_id)
         ovs_mutex_unlock(&backer->recirc_mutex);
         recirc_id_free(backer->rid_pool, node->recirc_id);
 
-        if (node->ofproto != ofproto) {
-            VLOG_ERR("recirc_id %"PRIu32", freed by incorrect ofproto (%s),"
-                     " expect ofproto (%s)", node->recirc_id, ofproto->up.name,
-                     node->ofproto->up.name);
-        }
+        /* 'recirc_id' should never be freed by non-owning 'ofproto'. */
+        ovs_assert(node->ofproto == ofproto);
 
         /* RCU postpone the free, since other threads may be referring
          * to 'node' at same time. */