From eab90a0de507dfd9a4d073be066ee6882f111cc0 Mon Sep 17 00:00:00 2001 From: Sravan Kumar Kairam Date: Wed, 3 Oct 2018 17:24:57 +0530 Subject: [PATCH] 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 --- components/ipa/core/src/wlan_ipa_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index c7bdbad71146..3b45420b46c5 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/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;