Browse Source

qcacld-3.0: Mem zero ipa wdi initialization structures

At ipa wdi initialization host needs to fill structure
ipa_wdi_init_in_params and pass to IPA driver. Currently
host is filling the local stack structure with out zeroing
out the memory and passed to IPA driver. This will lead to
invalid assignment of struct variables to IPA driver copy
for which host did not fill. So before using the ipa wdi
initialization structure mem zero it.

Change-Id: If054c2175741e6f23ebbf2165761aee8e2f8e2f0
CRs-Fixed: 2322734
Sravan Kumar Kairam 6 years ago
parent
commit
eab90a0de5
1 changed files with 3 additions and 0 deletions
  1. 3 0
      components/ipa/core/src/wlan_ipa_core.c

+ 3 - 0
components/ipa/core/src/wlan_ipa_core.c

@@ -358,6 +358,9 @@ static inline QDF_STATUS wlan_ipa_wdi_init(struct wlan_ipa_priv *ipa_ctx)
 
 	ipa_ctx->uc_loaded = false;
 
+	qdf_mem_zero(&in, sizeof(in));
+	qdf_mem_zero(&out, sizeof(out));
+
 	QDF_IPA_WDI_INIT_IN_PARAMS_WDI_VERSION(&in) = ipa_ctx->wdi_version;
 	QDF_IPA_WDI_INIT_IN_PARAMS_NOTIFY(&in) = wlan_ipa_uc_loaded_uc_cb;
 	QDF_IPA_WDI_INIT_IN_PARAMS_PRIV(&in) = ipa_ctx;