Re: [PATCH] drm/amd/display: Fix NULL ptr deref for commit_planes_to_stream
On 2018-11-30 10:09 a.m., Nicholas Kazlauskas wrote: > [Why] > With scaling, underscan and abm changes we can end up calling > commit_planes_to_stream in commit_tail. This call uses dm_state->context > which can be NULL if the commit was a fast update. > > [How] > Use dc_state instead since that can't be NULL unless the system ran > out of memory. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108912 > Fixes: e64abff2f133 ("drm/amd/display: Use private obj helpers for > dm_atomic_state") > > Cc: Leo Li > Cc: Harry Wentland > Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > index 76b1aebdca0c..8ecd78657d43 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -5011,7 +5011,7 @@ static void amdgpu_dm_atomic_commit_tail(struct > drm_atomic_state *state) > status->plane_count, > dm_new_crtc_state, > to_dm_crtc_state(old_crtc_state), > - dm_state->context)) > + dc_state)) > dm_error("%s: Failed to update stream scaling!\n", > __func__); > } > > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] drm/amd/display: Fix NULL ptr deref for commit_planes_to_stream
On 2018-11-30 10:13 a.m., Deucher, Alexander wrote: > Acked-by: Alex Deucher Reviewed-by: Leo Li > > > *From:* amd-gfx on behalf of > Nicholas Kazlauskas > *Sent:* Friday, November 30, 2018 10:09:28 AM > *To:* amd-gfx@lists.freedesktop.org > *Cc:* Li, Sun peng (Leo); Wentland, Harry; Kazlauskas, Nicholas > *Subject:* [PATCH] drm/amd/display: Fix NULL ptr deref for > commit_planes_to_stream > [Why] > With scaling, underscan and abm changes we can end up calling > commit_planes_to_stream in commit_tail. This call uses dm_state->context > which can be NULL if the commit was a fast update. > > [How] > Use dc_state instead since that can't be NULL unless the system ran > out of memory. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108912 > Fixes: e64abff2f133 ("drm/amd/display: Use private obj helpers for > dm_atomic_state") > > Cc: Leo Li > Cc: Harry Wentland > Signed-off-by: Nicholas Kazlauskas > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > index 76b1aebdca0c..8ecd78657d43 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -5011,7 +5011,7 @@ static void amdgpu_dm_atomic_commit_tail(struct > drm_atomic_state *state) > status->plane_count, > dm_new_crtc_state, > to_dm_crtc_state(old_crtc_state), > - dm_state->context)) > + dc_state)) > dm_error("%s: Failed to update stream > scaling!\n", __func__); > } > > -- > 2.17.1 > > ___ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] drm/amd/display: Fix NULL ptr deref for commit_planes_to_stream
Acked-by: Alex Deucher From: amd-gfx on behalf of Nicholas Kazlauskas Sent: Friday, November 30, 2018 10:09:28 AM To: amd-gfx@lists.freedesktop.org Cc: Li, Sun peng (Leo); Wentland, Harry; Kazlauskas, Nicholas Subject: [PATCH] drm/amd/display: Fix NULL ptr deref for commit_planes_to_stream [Why] With scaling, underscan and abm changes we can end up calling commit_planes_to_stream in commit_tail. This call uses dm_state->context which can be NULL if the commit was a fast update. [How] Use dc_state instead since that can't be NULL unless the system ran out of memory. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108912 Fixes: e64abff2f133 ("drm/amd/display: Use private obj helpers for dm_atomic_state") Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 76b1aebdca0c..8ecd78657d43 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5011,7 +5011,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) status->plane_count, dm_new_crtc_state, to_dm_crtc_state(old_crtc_state), - dm_state->context)) + dc_state)) dm_error("%s: Failed to update stream scaling!\n", __func__); } -- 2.17.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm/amd/display: Fix NULL ptr deref for commit_planes_to_stream
[Why] With scaling, underscan and abm changes we can end up calling commit_planes_to_stream in commit_tail. This call uses dm_state->context which can be NULL if the commit was a fast update. [How] Use dc_state instead since that can't be NULL unless the system ran out of memory. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108912 Fixes: e64abff2f133 ("drm/amd/display: Use private obj helpers for dm_atomic_state") Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 76b1aebdca0c..8ecd78657d43 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5011,7 +5011,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) status->plane_count, dm_new_crtc_state, to_dm_crtc_state(old_crtc_state), - dm_state->context)) + dc_state)) dm_error("%s: Failed to update stream scaling!\n", __func__); } -- 2.17.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx