Ver Fonte

qcacld-3.0: Fix deadlock for race condition

When connect from wpa_supplicant and roam from F/W happens at same
time, supplicant hold cm cm_req_lock and wait rsp from scheduler
thread, sheduler thread is blocked to wait for cm_req_lock.

Change-Id: I6b9010972d29be9a32d3b85ee72891ed62b50801
CRs-Fixed: 3087169
Jianmin Zhu há 3 anos atrás
pai
commit
86a4abbf0f

+ 1 - 1
components/cmn_services/interface_mgr/src/wlan_if_mgr_sta.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -84,7 +85,6 @@ QDF_STATUS if_mgr_connect_start(struct wlan_objmgr_vdev *vdev,
 		 * this scenario.
 		 */
 		if_mgr_disable_roaming(pdev, vdev, RSO_CONNECT_START);
-		wlan_tdls_teardown_links_sync(psoc);
 	}
 
 	return QDF_STATUS_SUCCESS;

+ 7 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c

@@ -60,6 +60,13 @@ QDF_STATUS cm_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 		return QDF_STATUS_E_NULL_VALUE;
 	}
 
+	if (cm_is_vdev_connecting(vdev) || cm_is_vdev_disconnecting(vdev)) {
+		mlme_err("vdev %d Roam sync not handled in conneting/disconneting state",
+			 vdev_id);
+		return cm_roam_stop_req(psoc, vdev_id,
+					REASON_ROAM_SYNCH_FAILED);
+	}
+
 	status = cm_sm_deliver_event(vdev, WLAN_CM_SM_EV_ROAM_SYNC,
 				     event_data_len, event);