From d9e832951812238c8b7fd4c6a366ba53101704a4 Mon Sep 17 00:00:00 2001 From: Timothy McDaniel Date: Wed, 3 Feb 2021 12:12:21 -0600 Subject: [PATCH] event/dlb: fix accessing uninitialized variables This patch updates the PMD to initialize response fields prior to calling into the PF layer. Coverity issue: 366200, 366202, 366205 Fixes: eb14a3421afd ("event/dlb: add eventdev start") Fixes: f0073621940c ("event/dlb: add eventdev stop and close") Cc: stable@dpdk.org Signed-off-by: Timothy McDaniel --- drivers/event/dlb/dlb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c index 64e6df7373..8b26d1d2d2 100644 --- a/drivers/event/dlb/dlb.c +++ b/drivers/event/dlb/dlb.c @@ -1847,7 +1847,7 @@ dlb_hw_create_dir_queue(struct dlb_eventdev *dlb, int32_t qm_port_id) { struct dlb_hw_dev *handle = &dlb->qm_instance; struct dlb_create_dir_queue_args cfg; - struct dlb_cmd_response response; + struct dlb_cmd_response response = {0}; int32_t ret; cfg.response = (uintptr_t)&response; @@ -3573,7 +3573,7 @@ dlb_get_ldb_queue_depth(struct dlb_eventdev *dlb, { struct dlb_hw_dev *handle = &dlb->qm_instance; struct dlb_get_ldb_queue_depth_args cfg; - struct dlb_cmd_response response; + struct dlb_cmd_response response = {0}; int ret; cfg.queue_id = queue->qm_queue.id; @@ -3595,7 +3595,7 @@ dlb_get_dir_queue_depth(struct dlb_eventdev *dlb, { struct dlb_hw_dev *handle = &dlb->qm_instance; struct dlb_get_dir_queue_depth_args cfg; - struct dlb_cmd_response response; + struct dlb_cmd_response response = {0}; int ret; cfg.queue_id = queue->qm_queue.id; -- 2.20.1