DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] DPAA compilation fix ppc64le and riscv
@ 2026-10-28  8:51 Gagandeep Singh
  2026-10-28  8:51 ` [PATCH v2 1/1] bus/dpaa: fix maybe-uninitialized in bman_release_fast Gagandeep Singh
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Gagandeep Singh @ 2026-10-28  8:51 UTC (permalink / raw)
  To: dev; +Cc: hemant.agrawal

V2-changes:
- updated the Author name.

Stephen Hemminger (1):
  bus/dpaa: fix maybe-uninitialized in bman_release_fast

 drivers/bus/dpaa/base/qbman/bman.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH] bus/dpaa: fix maybe-uninitialized in bman_release_fast
@ 2026-10-27  6:15 Gagandeep Singh
  2026-10-27  6:31 ` [PATCH v2 0/1] DPAA compilation fix ppc64le and riscv Gagandeep Singh
  0 siblings, 1 reply; 6+ messages in thread
From: Gagandeep Singh @ 2026-10-27  6:15 UTC (permalink / raw)
  To: dev; +Cc: hemant.agrawal, jun.yang, Gagandeep Singh, David Marchand

From: David Marchand <david.marchand@redhat.com>

The conversion loop is bounded only by num, which is not checked
unless RTE_LIBRTE_DPAA_HWDEBUG is set. GCC on ppc64le and riscv
therefore warns that bm_bufs[0] may be read uninitialized when
copying the first entry into the RCR.

Convert entry 0 unconditionally, as bman_release() does.

Fixes: e55e2e2d0c66 ("bus/dpaa: optimize DPAA multi-entry buffer pool operations")
Cc: jun.yang@nxp.com

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/bus/dpaa/base/qbman/bman.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/dpaa/base/qbman/bman.c b/drivers/bus/dpaa/base/qbman/bman.c
index 2b081cb78a..76e612662f 100644
--- a/drivers/bus/dpaa/base/qbman/bman.c
+++ b/drivers/bus/dpaa/base/qbman/bman.c
@@ -279,7 +279,8 @@ bman_release_fast(struct bman_pool *pool, const uint64_t *bufs,
 	if (unlikely(!r))
 		return -EBUSY;
 
-	for (i = 0; i < num; i++)
+	bm_buffer_set64_to_be(&bm_bufs[0], bufs[0]);
+	for (i = 1; i < num; i++)
 		bm_buffer_set64_to_be(&bm_bufs[i], bufs[i]);
 
 	/* bufs[0] overlaps the verb, which bm_rcr_pvb_commit() writes last
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-28  8:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28  8:51 [PATCH v2 0/1] DPAA compilation fix ppc64le and riscv Gagandeep Singh
2026-10-28  8:51 ` [PATCH v2 1/1] bus/dpaa: fix maybe-uninitialized in bman_release_fast Gagandeep Singh
2026-10-28  8:51 ` [PATCH 1/3] drivers: add offline (O/H) port device support Gagandeep Singh
2026-10-28  8:51 ` [PATCH 2/3] net/dpaa: support non fmX-macY type of shared Ethernet name Gagandeep Singh
2026-10-28  8:51 ` [PATCH 3/3] drivers: add DPAA cgrid cleanup support Gagandeep Singh
  -- strict thread matches above, loose matches on Subject: below --
2026-10-27  6:15 [PATCH] bus/dpaa: fix maybe-uninitialized in bman_release_fast Gagandeep Singh
2026-10-27  6:31 ` [PATCH v2 0/1] DPAA compilation fix ppc64le and riscv Gagandeep Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox