[PATCH v2 1/1] bus/dpaa: fix maybe-uninitialized in bman_release_fast
Gagandeep Singh
g.singh at nxp.com
Tue Oct 27 07:31:31 CET 2026
From: Stephen Hemminger <stephen at networkplumber.org>
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 at nxp.com
Signed-off-by: Gagandeep Singh <g.singh at nxp.com>
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
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
More information about the dev
mailing list