瀏覽代碼

qcacld-3.0: Fix uninitialized subtype usage by policy manager

Currently, Updation of vdev related parameters
policy_mgr_vdev_entry_info is conditional. Conditional
updation can cause uninitialized usage of subtype of
policy_mgr_vdev_entry_info by policy manager to get concurrency
mode.

Fix is to initialize policy_mgr_vdev_entry_info with zero.

Change-Id: If1350bd66705defdea2e69d559de0a6578acde02
CRs-Fixed: 2423871
sheenam monga 6 年之前
父節點
當前提交
4a3f34138c

+ 1 - 1
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -1609,7 +1609,7 @@ QDF_STATUS policy_mgr_incr_connection_count(
 {
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 	uint32_t conn_index;
-	struct policy_mgr_vdev_entry_info conn_table_entry;
+	struct policy_mgr_vdev_entry_info conn_table_entry = {0};
 	enum policy_mgr_chain_mode chain_mask = POLICY_MGR_ONE_ONE;
 	uint8_t nss_2g = 0, nss_5g = 0;
 	enum policy_mgr_con_mode mode;

+ 1 - 1
components/nan/core/inc/wlan_nan_api.h

@@ -226,7 +226,7 @@ static inline QDF_STATUS
 wlan_nan_get_connection_info(struct wlan_objmgr_psoc *psoc,
 			     struct policy_mgr_vdev_entry_info *conn_info)
 {
-	return QDF_STATUS_SUCCESS;
+	return QDF_STATUS_E_FAILURE;
 }
 
 static inline uint8_t wlan_nan_get_disc_5g_ch(struct wlan_objmgr_psoc *psoc)