DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] event/dlb: fix accessing uninitialized variables
@ 2021-02-22 19:49 Timothy McDaniel
  2021-03-07 15:26 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: Timothy McDaniel @ 2021-02-22 19:49 UTC (permalink / raw)
  To: jerinj
  Cc: mattias.ronnblom, dev, john.mcnamara, harry.van.haaren,
	timothy.mcdaniel, stable

This patch updates the PMD to initialize response fields
prior to calling into the PF layer.

Coverity issue: 366187, 366186, 366184, 366166, 366159,
		366158, 366153, 366145, 366127, 366125, 366120
Fixes: 8bb077f44ef2 ("event/dlb: add port unlink and unlinks in progress")
Fixes: 6a89b28f8163 ("event/dlb: add port link")
Fixes: eb14a3421afd ("event/dlb: add eventdev start")
Fixes: b94c709decbe ("event/dlb: add infos get and configure")
Fixes: f7a9172f36b4 ("event/dlb: add queue setup")
Cc: stable@dpdk.org

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb/dlb.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c
index 8b26d1d..18bd19c 100644
--- a/drivers/event/dlb/dlb.c
+++ b/drivers/event/dlb/dlb.c
@@ -382,7 +382,7 @@ struct process_local_port_data
 dlb_ldb_credit_pool_create(struct dlb_hw_dev *handle)
 {
 	struct dlb_create_ldb_pool_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	if (handle == NULL)
@@ -414,7 +414,7 @@ struct process_local_port_data
 dlb_dir_credit_pool_create(struct dlb_hw_dev *handle)
 {
 	struct dlb_create_dir_pool_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	if (handle == NULL)
@@ -447,7 +447,7 @@ struct process_local_port_data
 {
 	int ret = 0;
 	struct dlb_create_sched_domain_args *config_params;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 
 	if (resources_asked == NULL) {
 		DLB_LOG_ERR("dlb: dlb_create NULL parameter\n");
@@ -711,7 +711,7 @@ struct process_local_port_data
 			       uint16_t qm_qid)
 {
 	struct dlb_unmap_qid_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int32_t ret;
 
 	if (handle == NULL)
@@ -841,7 +841,7 @@ struct process_local_port_data
 	struct dlb_eventdev *dlb;
 	struct dlb_hw_dev *handle;
 	struct dlb_pending_port_unmaps_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	RTE_SET_USED(dev);
@@ -1253,7 +1253,7 @@ struct process_local_port_data
 {
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_create_ldb_queue_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int32_t ret;
 	uint32_t qm_qid;
 	int sched_type = -1;
@@ -1309,7 +1309,7 @@ struct process_local_port_data
 {
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_get_sn_allocation_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	cfg.group = group;
@@ -1330,7 +1330,7 @@ struct process_local_port_data
 {
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_set_sn_allocation_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	cfg.num = num;
@@ -1352,7 +1352,7 @@ struct process_local_port_data
 {
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_get_sn_occupancy_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	cfg.group = group;
@@ -1893,7 +1893,7 @@ static int dlb_num_dir_queues_setup(struct dlb_eventdev *dlb)
 			   uint8_t priority)
 {
 	struct dlb_map_qid_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int32_t ret;
 
 	if (handle == NULL)
@@ -2121,7 +2121,7 @@ static int dlb_num_dir_queues_setup(struct dlb_eventdev *dlb)
 	struct dlb_eventdev *dlb = dlb_pmd_priv(dev);
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_start_domain_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret, i;
 
 	rte_spinlock_lock(&dlb->qm_instance.resource_lock);
-- 
1.7.10


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] event/dlb: fix accessing uninitialized variables
  2021-02-22 19:49 [dpdk-dev] [PATCH] event/dlb: fix accessing uninitialized variables Timothy McDaniel
@ 2021-03-07 15:26 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2021-03-07 15:26 UTC (permalink / raw)
  To: Timothy McDaniel
  Cc: Jerin Jacob, Mattias Rönnblom, dpdk-dev, John McNamara,
	Van Haaren, Harry, dpdk stable

On Tue, Feb 23, 2021 at 1:19 AM Timothy McDaniel
<timothy.mcdaniel@intel.com> wrote:
>
> This patch updates the PMD to initialize response fields
> prior to calling into the PF layer.
>
> Coverity issue: 366187, 366186, 366184, 366166, 366159,
>                 366158, 366153, 366145, 366127, 366125, 366120
> Fixes: 8bb077f44ef2 ("event/dlb: add port unlink and unlinks in progress")
> Fixes: 6a89b28f8163 ("event/dlb: add port link")
> Fixes: eb14a3421afd ("event/dlb: add eventdev start")
> Fixes: b94c709decbe ("event/dlb: add infos get and configure")
> Fixes: f7a9172f36b4 ("event/dlb: add queue setup")
> Cc: stable@dpdk.org
>
> Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>


Since event/dlb/ will be removed from this release. I am marking this
patch as "Not applicable" for main treee, Stable maintainer can pull
this patch to the stable tree.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-07 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22 19:49 [dpdk-dev] [PATCH] event/dlb: fix accessing uninitialized variables Timothy McDaniel
2021-03-07 15:26 ` Jerin Jacob

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).