patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Gujjar, Abhinandan S" <abhinandan.gujjar@intel.com>
To: "Ma, WenwuX" <wenwux.ma@intel.com>,
	"ajit.khaparde@broadcom.com" <ajit.khaparde@broadcom.com>,
	"somnath.kotur@broadcom.com" <somnath.kotur@broadcom.com>,
	"amitprakashs@marvell.com" <amitprakashs@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>
Cc: "Liao, TingtingX" <tingtingx.liao@intel.com>
Subject: RE: [PATCH 2/3] eventdev: fix uninitialized variable
Date: Wed, 27 Nov 2024 10:49:05 +0000	[thread overview]
Message-ID: <PH0PR11MB5832FC24C72EB1B9F43B76E8E8282@PH0PR11MB5832.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20241125064755.3943-3-wenwux.ma@intel.com>



> -----Original Message-----
> From: Ma, WenwuX <wenwux.ma@intel.com>
> Sent: Monday, November 25, 2024 12:18 PM
> To: ajit.khaparde@broadcom.com; somnath.kotur@broadcom.com;
> amitprakashs@marvell.com; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; dev@dpdk.org; stable@dpdk.org
> Cc: Liao, TingtingX <tingtingx.liao@intel.com>; Ma, WenwuX
> <wenwux.ma@intel.com>
> Subject: [PATCH 2/3] eventdev: fix uninitialized variable
> 
> This patch fixes the variable 'events' may be used uninitialized.
> 
> Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
>  lib/eventdev/rte_event_crypto_adapter.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/eventdev/rte_event_crypto_adapter.c
> b/lib/eventdev/rte_event_crypto_adapter.c
> index 939ca1cad9..1ca839510b 100644
> --- a/lib/eventdev/rte_event_crypto_adapter.c
> +++ b/lib/eventdev/rte_event_crypto_adapter.c
> @@ -685,6 +685,7 @@ eca_ops_enqueue_burst(struct
> event_crypto_adapter *adapter,
>  	nb_ev = 0;
>  	retry = 0;
>  	nb_enqueued = 0;
> +	memset(events, 0, sizeof(events));
There is a rte_memcpy() at line number 699 which is copying response information as event into this.
So, that will initialize all the event fields. We don't require to initialize events here.

>  	num = RTE_MIN(num, BATCH_SIZE);
>  	for (i = 0; i < num; i++) {
>  		struct rte_event *ev = &events[nb_ev++];
> --
> 2.34.1


  reply	other threads:[~2024-11-27 10:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25  6:47 [PATCH 0/3] " Wenwu Ma
2024-11-25  6:47 ` [PATCH 1/3] net/bnxt: " Wenwu Ma
2024-11-25  6:47 ` [PATCH 2/3] eventdev: " Wenwu Ma
2024-11-27 10:49   ` Gujjar, Abhinandan S [this message]
2024-11-25  6:47 ` [PATCH 3/3] " Wenwu Ma
2024-11-27  2:46   ` Liao, TingtingX

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=PH0PR11MB5832FC24C72EB1B9F43B76E8E8282@PH0PR11MB5832.namprd11.prod.outlook.com \
    --to=abhinandan.gujjar@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=amitprakashs@marvell.com \
    --cc=dev@dpdk.org \
    --cc=somnath.kotur@broadcom.com \
    --cc=stable@dpdk.org \
    --cc=tingtingx.liao@intel.com \
    --cc=wenwux.ma@intel.com \
    /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).