[ovs-dev] [PATCH] Warn the free of 'recirc_id' by wrong 'ofproto'.
Andy Zhou
azhou at nicira.com
Tue Dec 23 23:17:45 UTC 2014
Thanks for making the change.
Acked-by: Andy Zhou <azhou at nicira.com>
On Tue, Dec 23, 2014 at 2:21 PM, Alex Wang <alexw at nicira.com> wrote:
> Issues a ERR log when the 'recirc_id' is not freed by the
> owning 'ofproto'.
>
> Signed-off-by: Alex Wang <alexw at nicira.com>
> ---
> ofproto/ofproto-dpif.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index cdd302a..b5fe73f 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -5458,6 +5458,13 @@ ofproto_dpif_free_recirc_id(struct ofproto_dpif *ofproto, uint32_t recirc_id)
> cmap_remove(&backer->recirc_map, &node->cmap_node, node->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);
> + }
> +
> /* RCU postpone the free, since other threads may be referring
> * to 'node' at same time. */
> ovsrcu_postpone(free, node);
> --
> 1.7.9.5
>
More information about the dev
mailing list