[patch] drm/amdgpu: missing bounds check in amdgpu_set_pp_force_state()

2016-06-16 Thread Dan Carpenter
Sure, I'll resend. Unsigned is a little cleaner. There is no new error code/message or change in behavior though either way. regards, dan carpenter

[patch] drm/amdgpu: missing bounds check in amdgpu_set_pp_force_state()

2016-06-16 Thread Dan Carpenter
On Thu, Jun 16, 2016 at 09:26:03AM +0200, walter harms wrote: > > > Am 16.06.2016 08:41, schrieb Dan Carpenter: > > There is no limit on high "idx" can go. It should be less than > > ARRAY_SIZE(data.states) which is 16. > > > > The "data" variable wasn't declared in that scope so I shifted the

[patch] drm/amdgpu: missing bounds check in amdgpu_set_pp_force_state()

2016-06-16 Thread Christian König
Am 16.06.2016 um 09:54 schrieb Dan Carpenter: > On Thu, Jun 16, 2016 at 09:26:03AM +0200, walter harms wrote: >> >> Am 16.06.2016 08:41, schrieb Dan Carpenter: >>> There is no limit on high "idx" can go. It should be less than >>> ARRAY_SIZE(data.states) which is 16. >>> >>> The "data" variable wa

[patch] drm/amdgpu: missing bounds check in amdgpu_set_pp_force_state()

2016-06-16 Thread Dan Carpenter
There is no limit on high "idx" can go. It should be less than ARRAY_SIZE(data.states) which is 16. The "data" variable wasn't declared in that scope so I shifted the code around a bit to make it work. Fixes: f3898ea12fc1 ('drm/amd/powerplay: add some sysfs interfaces for powerplay.') Signed-of

[patch] drm/amdgpu: missing bounds check in amdgpu_set_pp_force_state()

2016-06-16 Thread walter harms
Am 16.06.2016 08:41, schrieb Dan Carpenter: > There is no limit on high "idx" can go. It should be less than > ARRAY_SIZE(data.states) which is 16. > > The "data" variable wasn't declared in that scope so I shifted the code > around a bit to make it work. > > Fixes: f3898ea12fc1 ('drm/amd/powe