* [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; 4+ 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] 4+ 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; 4+ 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] 4+ 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-25 6:47 ` [PATCH 3/3] " Wenwu Ma
2 siblings, 0 replies; 4+ 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] 4+ 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
2 siblings, 0 replies; 4+ 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] 4+ messages in thread
end of thread, other threads:[~2024-11-25 7:05 UTC | newest]
Thread overview: 4+ 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-25 6:47 ` [PATCH 3/3] " Wenwu Ma
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).