From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 36DAEA0A0E; Wed, 3 Feb 2021 19:12:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC6272406B4; Wed, 3 Feb 2021 19:12:21 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 3A1132406B3 for ; Wed, 3 Feb 2021 19:12:20 +0100 (CET) IronPort-SDR: 87bqn4+7YlbADVsRCKIEjmEe+yPEQJH1rOxC02tofgrkrbvhUdroFL21X/BLENDA7e0Xkr0dGv xFqi//XfNprQ== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="160256133" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="160256133" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 10:12:18 -0800 IronPort-SDR: zDAFmH1l2AIhLtf67FGxZnMqOO8eWpH7scrrBNiUdoXhJ/sdKBTRBaAgWVuVC5nnmlH03JH8Uw ToJfTX+DwaPQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="507838100" Received: from txasoft-yocto.an.intel.com ([10.123.72.192]) by orsmga004.jf.intel.com with ESMTP; 03 Feb 2021 10:12:16 -0800 From: Timothy McDaniel To: jerinj@marvell.com Cc: mattias.ronnblom@ericsson.com, dev@dpdk.org, john.mcnamara@intel.com, harry.van.haaren@intel.com, timothy.mcdaniel@intel.com Date: Wed, 3 Feb 2021 12:12:21 -0600 Message-Id: <1612375941-26138-1-git-send-email-timothy.mcdaniel@intel.com> X-Mailer: git-send-email 1.7.10 Subject: [dpdk-dev] [PATCH] event/dlb: fix bugs due to accessing uninitialized variables X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch updates the PMD to initialize response fields prior to calling into the PF layer. Fixes the following coverity issues: Fixes: eb14a3421afd ("event/dlb: add eventdev start") Coverity issue: 366205 Fixes: f0073621940c ("event/dlb: add eventdev stop and close") Coverity issue: 366202 Fixes: f0073621940c ("event/dlb: add eventdev stop and close") Coverity issue: 366200 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 64e6df7..8b26d1d 100644 --- a/drivers/event/dlb/dlb.c +++ b/drivers/event/dlb/dlb.c @@ -1847,7 +1847,7 @@ static int dlb_num_dir_queues_setup(struct dlb_eventdev *dlb) { 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 @@ static int dlb_num_dir_queues_setup(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 @@ static int dlb_num_dir_queues_setup(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; -- 1.7.10