net/bnxt: fix crash during NAT configuration
authorKishore Padmanabha <kishore.padmanabha@broadcom.com>
Tue, 22 Sep 2020 07:06:32 +0000 (12:36 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 30 Sep 2020 17:19:10 +0000 (19:19 +0200)
Initialize the global parameters structure to avoid segmentation fault
in the TRUFLOW global configuration set API.

Fixes: 0a58be6f7c1e ("net/bnxt: add access to NAT global register")
Cc: stable@dpdk.org
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/tf_ulp/bnxt_ulp.c

index 762fc0c..93a7959 100644 (file)
@@ -594,7 +594,7 @@ bnxt_ulp_global_cfg_update(struct bnxt *bp,
 {
        uint32_t global_cfg = 0;
        int rc;
-       struct tf_global_cfg_parms parms;
+       struct tf_global_cfg_parms parms = { 0 };
 
        /* Initialize the params */
        parms.dir = dir,