* [PATCH 0/3] fix uninitialized variable
@ 2024-11-25 6:47 Wenwu Ma
2024-11-25 6:47 ` [PATCH 1/3] net/bnxt: " Wenwu Ma
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Wenwu Ma @ 2024-11-25 6:47 UTC (permalink / raw)
To: ajit.khaparde, somnath.kotur, amitprakashs, abhinandan.gujjar,
dev, stable
Cc: tingtingx.liao, Wenwu Ma
fix uninitialized variables in batches
Wenwu Ma (3):
net/bnxt: fix uninitialized variable
eventdev: fix uninitialized variable
eventdev: fix uninitialized variable
drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c | 2 +-
lib/eventdev/rte_event_crypto_adapter.c | 1 +
lib/eventdev/rte_event_dma_adapter.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] net/bnxt: fix uninitialized variable
2024-11-25 6:47 [PATCH 0/3] fix uninitialized variable Wenwu Ma
@ 2024-11-25 6:47 ` Wenwu Ma
2024-11-25 6:47 ` [PATCH 2/3] eventdev: " Wenwu Ma
2024-11-25 6:47 ` [PATCH 3/3] " Wenwu Ma
2 siblings, 0 replies; 6+ messages in thread
From: Wenwu Ma @ 2024-11-25 6:47 UTC (permalink / raw)
To: ajit.khaparde, somnath.kotur, amitprakashs, abhinandan.gujjar,
dev, stable
Cc: tingtingx.liao, Wenwu Ma
This patch fixes the variable 'total_pages' may be used uninitialized.
Fixes: 80317ff6adfd ("net/bnxt/tf_core: support Thor2")
Cc: stable@dpdk.org
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
---
drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c b/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
index 1770069295..3aed78dbeb 100644
--- a/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
+++ b/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
@@ -439,7 +439,7 @@ static int alloc_link_pbl(struct tfc_ts_mem_cfg *mem_cfg, uint32_t page_size,
char mz_name[RTE_MEMZONE_NAMESIZE];
int mz_size;
uint64_t total_size;
- uint32_t total_pages;
+ uint32_t total_pages = 0;
/* tf_em_size_page_tbl_lvl */
rc = num_pages_get(mem_cfg, page_size);
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] eventdev: fix uninitialized variable
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 ` Wenwu Ma
2024-11-27 10:49 ` Gujjar, Abhinandan S
2024-11-25 6:47 ` [PATCH 3/3] " Wenwu Ma
2 siblings, 1 reply; 6+ messages in thread
From: Wenwu Ma @ 2024-11-25 6:47 UTC (permalink / raw)
To: ajit.khaparde, somnath.kotur, amitprakashs, abhinandan.gujjar,
dev, stable
Cc: tingtingx.liao, Wenwu Ma
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));
num = RTE_MIN(num, BATCH_SIZE);
for (i = 0; i < num; i++) {
struct rte_event *ev = &events[nb_ev++];
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] eventdev: fix uninitialized variable
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-25 6:47 ` Wenwu Ma
2024-11-27 2:46 ` Liao, TingtingX
2 siblings, 1 reply; 6+ messages in thread
From: Wenwu Ma @ 2024-11-25 6:47 UTC (permalink / raw)
To: ajit.khaparde, somnath.kotur, amitprakashs, abhinandan.gujjar,
dev, stable
Cc: tingtingx.liao, Wenwu Ma
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++];
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] eventdev: fix uninitialized variable
2024-11-25 6:47 ` [PATCH 3/3] " Wenwu Ma
@ 2024-11-27 2:46 ` Liao, TingtingX
0 siblings, 0 replies; 6+ messages in thread
From: Liao, TingtingX @ 2024-11-27 2:46 UTC (permalink / raw)
To: Ma, WenwuX, dev
Cc: ajit.khaparde, somnath.kotur, amitprakashs, Gujjar, Abhinandan S, stable
> -----Original Message-----
> From: Ma, WenwuX <wenwux.ma@intel.com>
> Sent: 25 November 2024 14:47
> To: ajit.khaparde@broadcom.com; somnath.kotur@broadcom.com; amitprakashs@marvell.com; Gujjar, Abhinandan S; dev@dpdk.org;stable@dpdk.org
> Cc: Liao, TingtingX; Ma, WenwuX
> Subject: [PATCH 3/3] eventdev: fix uninitialized variable
>
> 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>
> ---
Tested-by: Liao Tingting <tingtingx.liao@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 2/3] eventdev: fix uninitialized variable
2024-11-25 6:47 ` [PATCH 2/3] eventdev: " Wenwu Ma
@ 2024-11-27 10:49 ` Gujjar, Abhinandan S
0 siblings, 0 replies; 6+ messages in thread
From: Gujjar, Abhinandan S @ 2024-11-27 10:49 UTC (permalink / raw)
To: Ma, WenwuX, ajit.khaparde, somnath.kotur, amitprakashs, dev, stable
Cc: Liao, TingtingX
> -----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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-11-27 10:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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).