From 656690c02ff8ae171775dda0e40792840852c6ae Mon Sep 17 00:00:00 2001 From: Sankeerth Billakanti Date: Tue, 24 Nov 2020 02:50:33 +0530 Subject: [PATCH] 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 --- msm/sde_hdcp_2x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msm/sde_hdcp_2x.c b/msm/sde_hdcp_2x.c index 773443655780..6eee1e564925 100644 --- a/msm/sde_hdcp_2x.c +++ b/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,