From: Gagandeep Singh <g.singh@nxp.com>
To: dev@dpdk.org
Cc: hemant.agrawal@nxp.com, jun.yang@nxp.com,
Gagandeep Singh <g.singh@nxp.com>,
Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v2 1/1] bus/dpaa: fix maybe-uninitialized in bman_release_fast
Date: Wed, 28 Oct 2026 14:21:51 +0530 [thread overview]
Message-ID: <20261028085154.699656-2-g.singh@nxp.com> (raw)
In-Reply-To: <20261028085154.699656-1-g.singh@nxp.com>
From: Stephen Hemminger <stephen@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@nxp.com
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Stephen Hemminger <stephen@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
next prev parent reply other threads:[~2026-10-28 8:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 8:51 [PATCH v2 0/1] DPAA compilation fix ppc64le and riscv Gagandeep Singh
2026-10-28 8:51 ` Gagandeep Singh [this message]
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
2026-10-27 6:31 ` [PATCH v2 1/1] bus/dpaa: fix maybe-uninitialized in bman_release_fast Gagandeep Singh
2026-10-27 7:48 ` David Marchand
2026-10-27 13:46 ` Stephen Hemminger
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=20261028085154.699656-2-g.singh@nxp.com \
--to=g.singh@nxp.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=jun.yang@nxp.com \
--cc=stephen@networkplumber.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.