From: Xueming Li <xuemingl@nvidia.com>
To: <dev@dpdk.org>
Cc: <xuemingl@nvidia.com>, <stable@dpdk.org>,
Gaetan Rivet <grive@u256.net>,
Gaetan Rivet <gaetan.rivet@6wind.com>
Subject: [dpdk-dev] [PATCH v1] eal: fix random device arguments in device iterator
Date: Wed, 27 Oct 2021 16:22:21 +0800 [thread overview]
Message-ID: <20211027082221.693957-1-xuemingl@nvidia.com> (raw)
Devargs used in device iterator initialization wasn't set to zero, random
data like bus string lead to invalid address access.
This patch initializes devargs.
Fixes: c99a2d4c6b7f ("eal: implement device iteration initialization")
Cc: stable@dpdk.org
Cc: Gaetan Rivet <grive@u256.net>
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
---
lib/eal/common/eal_common_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 148a23830ab..e1e9976d8dc 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -573,7 +573,7 @@ int
rte_dev_iterator_init(struct rte_dev_iterator *it,
const char *dev_str)
{
- struct rte_devargs devargs;
+ struct rte_devargs devargs = { .bus = NULL };
struct rte_class *cls = NULL;
struct rte_bus *bus = NULL;
--
2.33.0
next reply other threads:[~2021-10-27 8:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 8:22 Xueming Li [this message]
2021-11-04 10:41 ` [dpdk-dev] [dpdk-stable] " David Marchand
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=20211027082221.693957-1-xuemingl@nvidia.com \
--to=xuemingl@nvidia.com \
--cc=dev@dpdk.org \
--cc=gaetan.rivet@6wind.com \
--cc=grive@u256.net \
--cc=stable@dpdk.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 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).