Преглед изворни кода

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->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)) {
 		pr_debug("invalid state, hdcp off\n");
 		goto exit;
 	}
 
+	SDE_EVT32_EXTERNAL(hdcp->app_data.response.data[0]);
 	switch (hdcp->app_data.response.data[0]) {
 	case SKE_SEND_TYPE_ID:
 		if (!hdcp2_app_comm(hdcp->hdcp2_ctx,