disp: msm: dp: check for active panels ptr before cleanup
During a probable race condition where usermode is triggering a delayed cleanup, this instance would be empty leading to a null pointer dereference. This change will add protection around this pointer. Change-Id: I8e90a1ba3ca925f08678e5fa67616420204edae7 Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
This commit is contained in:
@@ -403,7 +403,7 @@ static void dp_display_hdcp_register_streams(struct dp_display_private *dp)
|
|||||||
static void dp_display_hdcp_deregister_stream(struct dp_display_private *dp,
|
static void dp_display_hdcp_deregister_stream(struct dp_display_private *dp,
|
||||||
enum dp_stream_id stream_id)
|
enum dp_stream_id stream_id)
|
||||||
{
|
{
|
||||||
if (dp->hdcp.ops->deregister_streams) {
|
if (dp->hdcp.ops->deregister_streams && dp->active_panels[stream_id]) {
|
||||||
struct stream_info stream = {stream_id,
|
struct stream_info stream = {stream_id,
|
||||||
dp->active_panels[stream_id]->vcpi};
|
dp->active_panels[stream_id]->vcpi};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user