Skip to content

Commit

Permalink
eal: fix device iterator when no bus is selected
Browse files Browse the repository at this point in the history
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.

Bugzilla ID: 862
Fixes: c99a2d4 ("eal: implement device iteration initialization")
Cc: stable@dpdk.org

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
  • Loading branch information
steevenlee authored and david-marchand committed Nov 4, 2021
1 parent adeca66 commit fc38202
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/eal/common/eal_common_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fc38202

Please sign in to comment.