浏览代码

disp: msm: dp: fix page fault from hdcp buffer access

There are certain cases where the start_auth and cleanup
are scheduled to be executed consecutively on the
sde_hdcp_2x_main thread. When this scenario occurs, the
functions to facilitate hdcp authentication which are
scheduled to execute after the clean needs to be protected
from dereferencing the freed hdcp message buffers.

This change will add a check to prevent dereferencing the
hdcp message buffer after hdcp cleanup is executed.

Change-Id: I669d25b7a6ce751127b1c21228b751eed8da5b38
Signed-off-by: Sankeerth Billakanti <[email protected]>
Sankeerth Billakanti 4 年之前
父节点
当前提交
656690c02f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      msm/sde_hdcp_2x.c

+ 2 - 2
msm/sde_hdcp_2x.c

@@ -478,14 +478,14 @@ static void sde_hdcp_2x_msg_sent(struct sde_hdcp_2x_ctrl *hdcp)
 		HDCP_TRANSPORT_CMD_INVALID,
 		HDCP_TRANSPORT_CMD_INVALID,
 		hdcp->client_data};
 		hdcp->client_data};
 
 
-	SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, hdcp->authenticated,
-					hdcp->app_data.response.data[0]);
+	SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, hdcp->authenticated);
 
 
 	if (atomic_read(&hdcp->hdcp_off)) {
 	if (atomic_read(&hdcp->hdcp_off)) {
 		pr_debug("invalid state, hdcp off\n");
 		pr_debug("invalid state, hdcp off\n");
 		goto exit;
 		goto exit;
 	}
 	}
 
 
+	SDE_EVT32_EXTERNAL(hdcp->app_data.response.data[0]);
 	switch (hdcp->app_data.response.data[0]) {
 	switch (hdcp->app_data.response.data[0]) {
 	case SKE_SEND_TYPE_ID:
 	case SKE_SEND_TYPE_ID:
 		if (!hdcp2_app_comm(hdcp->hdcp2_ctx,
 		if (!hdcp2_app_comm(hdcp->hdcp2_ctx,