msm: ipa: fix the use-after-free on qmi framework in ssr scenario

IPA drvier free the qmi server hdl without notify the qmi
framework which is causing the use-after-free on QMI framework.
The fix is to notify qmi framework before freeing the qmi handle.

Change-Id: I1ec9d3efd29283fddd958561a538b2995222a53c
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
This commit is contained in:
Bojun Pan 2020-09-09 15:06:26 -07:00
commit 3b8fe1bc8e

View file

@ -1507,6 +1507,7 @@ 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 */
qmi_handle_release(ipa_q6_clnt);
vfree(ipa_q6_clnt);
ipa_q6_clnt = NULL;
return;