diff options
author | Corbin McElhanney <corbin.mcelhanney@amd.com> | 2017-08-03 18:29:42 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 18:16:23 -0400 |
commit | 5aa72db72ccc08c2d3d3e4b0a285bab932db5132 (patch) | |
tree | 447ecfb2744b79da8a6fa9f5061cd901ea8ae21a | |
parent | cbb4d72e290df8fedc764c7abb823cae938a45aa (diff) |
drm/amd/display: Fix accessing freed memory
Signed-off-by: Corbin McElhanney <corbin.mcelhanney@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index f305780c36ce..b69a726717d9 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -1714,8 +1714,11 @@ void dc_update_planes_and_stream(struct dc *dc, } if (core_dc->current_context != context) { - dc_release_validate_context(core_dc->current_context); + struct validate_context *old = core_dc->current_context; + core_dc->current_context = context; + dc_release_validate_context(old); + } return; |