patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>
To: "Power, Ciara" <ciara.power@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"damianx.nowak@intel.com" <damianx.nowak@intel.com>,
	"Kovacevic, Marko" <marko.kovacevic@intel.com>
Subject: Re: [dpdk-stable] [PATCH v1 1/2] examples/fips_validation: fix unused malloc
Date: Mon, 16 Aug 2021 15:21:46 +0000	[thread overview]
Message-ID: <BL0PR11MB30430C950785E8DA386C177CB8FD9@BL0PR11MB3043.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210812142436.108053-2-ciara.power@intel.com>

> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Thursday, August 12, 2021 3:25 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Roy Fan <roy.fan.zhang@intel.com>; Power,
> Ciara <ciara.power@intel.com>; damianx.nowak@intel.com; Kovacevic,
> Marko <marko.kovacevic@intel.com>
> Subject: [PATCH v1 1/2] examples/fips_validation: fix unused malloc
> 
> The val.val pointer is allocated memory, however this memory is then
> freed in get_writeback_data() without being used beforehand.
> The pointer is then allocated memory again before use,
> so the very first allocation is removed as it was unnecessary.
> 
> Fixes: f4797bae0050 ("examples/fips_validation: support plain SHA")
> Cc: damianx.nowak@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ciara Power <ciara.power@intel.com>
> ---
>  examples/fips_validation/main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/examples/fips_validation/main.c
> b/examples/fips_validation/main.c
> index c175fe6ac2..2db00620ce 100644
> --- a/examples/fips_validation/main.c
> +++ b/examples/fips_validation/main.c
> @@ -1635,7 +1635,6 @@ fips_mct_sha_test(void)
>  	int ret;
>  	uint32_t i, j;
> 
> -	val.val = rte_malloc(NULL, (MAX_DIGEST_SIZE*SHA_MD_BLOCK), 0);
>  	for (i = 0; i < SHA_MD_BLOCK; i++)
>  		md[i].val = rte_malloc(NULL, (MAX_DIGEST_SIZE*2), 0);
> 
> --
> 2.25.1

Acked-by: Fan Zhang <roy.fan.zhang@intel.com>


  reply	other threads:[~2021-08-16 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 14:24 [dpdk-stable] [PATCH v1 0/2] fips validation app fixes Ciara Power
2021-08-12 14:24 ` [dpdk-stable] [PATCH v1 1/2] examples/fips_validation: fix unused malloc Ciara Power
2021-08-16 15:21   ` Zhang, Roy Fan [this message]
2021-08-12 14:24 ` [dpdk-stable] [PATCH v1 2/2] examples/fips_validation: fix resetting pointer Ciara Power
2021-08-16 15:22   ` Zhang, Roy Fan
2021-10-05  8:17 ` [dpdk-stable] [EXT] [dpdk-dev] [PATCH v1 0/2] fips validation app fixes Akhil Goyal

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=BL0PR11MB30430C950785E8DA386C177CB8FD9@BL0PR11MB3043.namprd11.prod.outlook.com \
    --to=roy.fan.zhang@intel.com \
    --cc=ciara.power@intel.com \
    --cc=damianx.nowak@intel.com \
    --cc=dev@dpdk.org \
    --cc=marko.kovacevic@intel.com \
    --cc=stable@dpdk.org \
    /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).