disp: msm: hdcp: avoid sink message processing when hdcp is off
Skip processing the sink message in sde_hdcp_2x_main thread when hdcp TA is unloaded. If there is any error generated during the authentication sequence, then the hdcp authentication is aborted and the source will restart the authentication procedure. When authentication is aborted, the qseecom handle is lost and memory it referenced becomes protected. When a subsequent command execution in the sde_hdcp_2x_main thread tries to dereference that particular memory from the qseecom handle, there is a page fault crash observed. This change will skip accessing the memory referenced by the qseecom handle when hdcp authentication session is tearing down. Change-Id: I71ed44042897f17cc8817a1b1c54a43e42cf5f73 Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
752c268d6e
commit
a8972ccc53
@@ -480,6 +480,12 @@ static void sde_hdcp_2x_msg_sent(struct sde_hdcp_2x_ctrl *hdcp)
|
||||
|
||||
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, hdcp->authenticated,
|
||||
hdcp->app_data.response.data[0]);
|
||||
|
||||
if (atomic_read(&hdcp->hdcp_off)) {
|
||||
pr_debug("invalid state, hdcp off\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
switch (hdcp->app_data.response.data[0]) {
|
||||
case SKE_SEND_TYPE_ID:
|
||||
if (!hdcp2_app_comm(hdcp->hdcp2_ctx,
|
||||
@@ -531,6 +537,8 @@ static void sde_hdcp_2x_msg_sent(struct sde_hdcp_2x_ctrl *hdcp)
|
||||
}
|
||||
|
||||
sde_hdcp_2x_wakeup_client(hdcp, &cdata);
|
||||
|
||||
exit:
|
||||
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, hdcp->authenticated);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user