[PATCH] drm/amd/amdgpu: default to zero number of states if not enabled

2016-10-06 Thread Colin Ian King
JinHuiEric; >> Zhu, Rex; Zhou, Jammy; StDenis, Tom; Dan Carpenter; Maling list - DRI >> developers; LKML >> Subject: Re: [PATCH] drm/amd/amdgpu: default to zero number of states if >> not enabled >> >> On 06/10/16 19:32, Alex Deucher wrote: >>> On T

[PATCH] drm/amd/amdgpu: default to zero number of states if not enabled

2016-10-06 Thread Colin Ian King
On 06/10/16 19:32, Alex Deucher wrote: > On Thu, Oct 6, 2016 at 2:02 PM, Colin King > wrote: >> From: Colin Ian King >> >> Currently, if adev->pp_enabled is false then the pp_stats_info data >> is not read and hence a garbage number of states from the stack >> is used to dump out the number of s

[PATCH] drm/amd/amdgpu: default to zero number of states if not enabled

2016-10-06 Thread Deucher, Alexander
enter; Maling list - DRI > developers; LKML > Subject: Re: [PATCH] drm/amd/amdgpu: default to zero number of states if > not enabled > > On 06/10/16 19:32, Alex Deucher wrote: > > On Thu, Oct 6, 2016 at 2:02 PM, Colin King > wrote: > >> From: Colin Ian King > &g

[PATCH] drm/amd/amdgpu: default to zero number of states if not enabled

2016-10-06 Thread Colin King
From: Colin Ian King Currently, if adev->pp_enabled is false then the pp_stats_info data is not read and hence a garbage number of states from the stack is used to dump out the number of states. Given data.nums could be any random value, this could easily lead to read outside the data.states arra

[PATCH] drm/amd/amdgpu: default to zero number of states if not enabled

2016-10-06 Thread Alex Deucher
On Thu, Oct 6, 2016 at 2:02 PM, Colin King wrote: > From: Colin Ian King > > Currently, if adev->pp_enabled is false then the pp_stats_info data > is not read and hence a garbage number of states from the stack > is used to dump out the number of states. Given data.nums could be > any random valu