From: Stephen Hemminger <stephen@networkplumber.org>
To: Wenwu Ma <wenwux.ma@intel.com>
Cc: ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com,
amitprakashs@marvell.com, abhinandan.gujjar@intel.com,
dev@dpdk.org, stable@dpdk.org, tingtingx.liao@intel.com
Subject: Re: [PATCH 3/3] eventdev: fix uninitialized variable
Date: Tue, 13 Jan 2026 12:04:25 -0800 [thread overview]
Message-ID: <20260113120425.273056ff@phoenix.local> (raw)
In-Reply-To: <20241125064755.3943-4-wenwux.ma@intel.com>
On Mon, 25 Nov 2024 14:47:55 +0800
Wenwu Ma <wenwux.ma@intel.com> wrote:
> This patch fixes the variable 'events' may be used uninitialized.
>
> Fixes: 3c89e8c42022 ("eventdev/dma: support adapter service function")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
> lib/eventdev/rte_event_dma_adapter.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/eventdev/rte_event_dma_adapter.c b/lib/eventdev/rte_event_dma_adapter.c
> index ff2bc408c1..3c05fb615f 100644
> --- a/lib/eventdev/rte_event_dma_adapter.c
> +++ b/lib/eventdev/rte_event_dma_adapter.c
> @@ -655,6 +655,7 @@ edma_ops_enqueue_burst(struct event_dma_adapter *adapter, struct rte_event_dma_a
> nb_ev = 0;
> retry = 0;
> nb_enqueued = 0;
> + memset(events, 0, sizeof(events));
> num = RTE_MIN(num, DMA_BATCH_SIZE);
> for (i = 0; i < num; i++) {
> struct rte_event *ev = &events[nb_ev++];
This shows that what every tool you are using to detect these errors is broken.
The loop here is setting the appropriate events.
Each event has two unions 64 bit words. Both of them are being set.
I can't see any unitialized data and neither does standard compiler.
prev parent reply other threads:[~2026-01-13 20:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 6:47 [PATCH 0/3] fix uninitialized variable 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
2024-11-25 6:47 ` [PATCH 3/3] " Wenwu Ma
2024-11-27 2:46 ` Liao, TingtingX
2026-01-13 20:04 ` Stephen Hemminger [this message]
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=20260113120425.273056ff@phoenix.local \
--to=stephen@networkplumber.org \
--cc=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