DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Iremonger, Bernard" <bernard.iremonger@intel.com>
To: "ohilyard@iol.unh.edu" <ohilyard@iol.unh.edu>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>
Subject: Re: [dpdk-dev] [PATCH v2] flow_classify: fix leaking rules on delete
Date: Thu, 24 Jun 2021 08:43:50 +0000	[thread overview]
Message-ID: <DM6PR11MB28902593ADCDD42A90BA265BEF079@DM6PR11MB2890.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210623170708.43755-1-ohilyard@iol.unh.edu>

Hi Owen,

> -----Original Message-----
> From: ohilyard@iol.unh.edu <ohilyard@iol.unh.edu>
> Sent: Wednesday, June 23, 2021 6:07 PM
> To: Iremonger, Bernard <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; david.marchand@redhat.com; Owen Hilyard
> <ohilyard@iol.unh.edu>
> Subject: [PATCH v2] flow_classify: fix leaking rules on delete
> 
> From: Owen Hilyard <ohilyard@iol.unh.edu>
> 
> Rules in a classify table were not freed if the table had a delete function.
> 
> Fixes: be41ac2a3 ("flow_classify: introduce flow classify library")
> 
> Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
> ---
>  lib/flow_classify/rte_flow_classify.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/flow_classify/rte_flow_classify.c
> b/lib/flow_classify/rte_flow_classify.c
> index f125267e8..d3ba2ed22 100644
> --- a/lib/flow_classify/rte_flow_classify.c
> +++ b/lib/flow_classify/rte_flow_classify.c
> @@ -579,12 +579,12 @@ rte_flow_classify_table_entry_delete(struct
> rte_flow_classifier *cls,
>  						&rule->u.key.key_del,
>  						&rule->key_found,
>  						&rule->entry);
> -
> +				if (ret == 0)
> +					free(rule);
>  				return ret;
>  			}
>  		}
>  	}
> -	free(rule);
>  	return ret;
>  }
> 
> --
> 2.30.2
This patch should be backported.
Please add the following line after the Fixes line:
Cc: stable@dpdk.org

Otherwise 

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>


  reply	other threads:[~2021-06-24  8:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 19:57 [dpdk-dev] [PATCH] lib/flow_classify: " ohilyard
2021-06-22  7:24 ` David Marchand
2021-06-22 11:59   ` Iremonger, Bernard
2021-06-23 17:07 ` [dpdk-dev] [PATCH v2] flow_classify: " ohilyard
2021-06-24  8:43   ` Iremonger, Bernard [this message]
2021-06-24  9:12     ` David Marchand
2021-06-24 13:21   ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB28902593ADCDD42A90BA265BEF079@DM6PR11MB2890.namprd11.prod.outlook.com \
    --to=bernard.iremonger@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ohilyard@iol.unh.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).