Эх сурвалжийг харах

Merge "msm:qmi: Fix race condition"

qctecmdr 3 жил өмнө
parent
commit
d3817512b5

+ 2 - 2
drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.c

@@ -1772,13 +1772,13 @@ static void ipa3_q6_clnt_svc_arrive(struct work_struct *work)
 		IPAWANERR(
 		"ipa3_qmi_init_modem_send_sync_msg failed due to SSR!\n");
 		/* Cleanup when ipa3_wwan_remove is called */
+		mutex_lock(&ipa3_qmi_lock);
 		if (ipa_q6_clnt != NULL) {
-			mutex_lock(&ipa3_qmi_lock);
 			qmi_handle_release(ipa_q6_clnt);
 			vfree(ipa_q6_clnt);
 			ipa_q6_clnt = NULL;
-			mutex_unlock(&ipa3_qmi_lock);
 		}
+		mutex_unlock(&ipa3_qmi_lock);
 		IPAWANERR("Exit from service arrive fun\n");
 		return;
 	}