linux_dsm_epyc7002/drivers/gpu/drm/amd/amdgpu
Dan Carpenter 041bf02255 drm/amdgpu: missing bounds check in amdgpu_set_pp_force_state()
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.  Also I made "idx" unsigned.

Fixes: f3898ea12f ('drm/amd/powerplay: add some sysfs interfaces for powerplay.')
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-06-17 13:50:10 -04:00
..
amdgpu_acp.c
amdgpu_acp.h
amdgpu_acpi.c
amdgpu_afmt.c
amdgpu_amdkfd_gfx_v7.c
amdgpu_amdkfd_gfx_v8.c
amdgpu_amdkfd.c
amdgpu_amdkfd.h
amdgpu_atombios.c
amdgpu_atombios.h
amdgpu_atpx_handler.c
amdgpu_benchmark.c
amdgpu_bios.c
amdgpu_bo_list.c
amdgpu_cgs.c drm/amdgpu: add release firmware for cgs 2016-06-09 10:49:13 -04:00
amdgpu_connectors.c drm/amdgpu: Fix hdmi deep color support. 2016-05-25 09:42:53 -04:00
amdgpu_connectors.h
amdgpu_cs.c
amdgpu_ctx.c
amdgpu_device.c amdgpu: fix asic initialization for virtualized environments (v2) 2016-06-13 15:25:20 -04:00
amdgpu_display.c
amdgpu_dpm.c
amdgpu_dpm.h
amdgpu_drv.c
amdgpu_drv.h
amdgpu_encoders.c
amdgpu_fb.c
amdgpu_fence.c
amdgpu_gart.c
amdgpu_gds.h
amdgpu_gem.c
amdgpu_gfx.c
amdgpu_gfx.h
amdgpu_i2c.c
amdgpu_i2c.h
amdgpu_ib.c Revert "drm/amdgpu: add pipeline sync while vmid switch in same ctx" 2016-06-13 18:59:17 -04:00
amdgpu_ih.c
amdgpu_ih.h
amdgpu_ioc32.c
amdgpu_irq.c
amdgpu_irq.h
amdgpu_job.c
amdgpu_kms.c
amdgpu_mn.c
amdgpu_mode.h
amdgpu_object.c
amdgpu_object.h
amdgpu_pll.c
amdgpu_pll.h
amdgpu_pm.c drm/amdgpu: missing bounds check in amdgpu_set_pp_force_state() 2016-06-17 13:50:10 -04:00
amdgpu_pm.h
amdgpu_powerplay.c drm/amdgpu: fix warning with powerplay disabled. 2016-06-10 11:40:49 +10:00
amdgpu_powerplay.h
amdgpu_prime.c
amdgpu_ring.c drm/amdgpu: fix missing free wb for cond_exec 2016-06-09 10:49:05 -04:00
amdgpu_sa.c drm/amdgpu: clear SA bo when created 2016-06-09 10:48:57 -04:00
amdgpu_sync.c
amdgpu_test.c
amdgpu_trace_points.c
amdgpu_trace.h
amdgpu_ttm.c
amdgpu_ucode.c
amdgpu_ucode.h
amdgpu_uvd.c drm/amdgpu: fix uvd fini mem leak 2016-06-09 10:49:08 -04:00
amdgpu_uvd.h
amdgpu_vce.c
amdgpu_vce.h
amdgpu_vm.c Revert "drm/amdgpu: add pipeline sync while vmid switch in same ctx" 2016-06-13 18:59:17 -04:00
amdgpu.h Revert "drm/amdgpu: add pipeline sync while vmid switch in same ctx" 2016-06-13 18:59:17 -04:00
atom.c
atom.h
atombios_crtc.c
atombios_crtc.h
atombios_dp.c
atombios_dp.h
atombios_encoders.c
atombios_encoders.h
atombios_i2c.c
atombios_i2c.h
ci_dpm.c drm/amdgpu: fix fw leak in non-powerplay dpm code 2016-06-09 10:48:56 -04:00
ci_dpm.h
ci_smc.c
cik_dpm.h
cik_ih.c
cik_ih.h
cik_sdma.c drm/amdgpu: fix cik sdma ucode memleak 2016-06-09 10:49:11 -04:00
cik_sdma.h
cik.c amdgpu: fix asic initialization for virtualized environments (v2) 2016-06-13 15:25:20 -04:00
cik.h
cikd.h
clearstate_ci.h
clearstate_defs.h
clearstate_vi.h
cz_dpm.c
cz_dpm.h
cz_ih.c
cz_ih.h
cz_smc.c
cz_smumgr.h
dce_v8_0.c
dce_v8_0.h
dce_v10_0.c
dce_v10_0.h
dce_v11_0.c Merge branch 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux into drm-next 2016-05-27 16:03:48 +10:00
dce_v11_0.h
fiji_dpm.c drm/amdgpu: fix fw leak in non-powerplay dpm code 2016-06-09 10:48:56 -04:00
fiji_smc.c
fiji_smum.h
gfx_v7_0.c drm/amdgpu/gfx7: fix broken condition check 2016-06-13 18:26:24 -04:00
gfx_v7_0.h
gfx_v8_0.c drm/amdgpu: fix gfx8 ucode mem leak 2016-06-09 10:49:06 -04:00
gfx_v8_0.h
gmc_v7_0.c
gmc_v7_0.h
gmc_v8_0.c
gmc_v8_0.h
iceland_dpm.c drm/amdgpu: fix fw leak in non-powerplay dpm code 2016-06-09 10:48:56 -04:00
iceland_ih.c
iceland_ih.h
iceland_sdma_pkt_open.h
iceland_smc.c
iceland_smumgr.h
Kconfig
kv_dpm.c
kv_dpm.h
kv_smc.c
Makefile
ObjectID.h
ppsmc.h
sdma_v2_4.c drm/amdgpu: fix sdma24 ucode mem leak 2016-06-09 10:49:10 -04:00
sdma_v2_4.h
sdma_v3_0.c drm/amdgpu: fix sdma3 ucode mem leak 2016-06-09 10:49:09 -04:00
sdma_v3_0.h
smu_ucode_xfer_vi.h
tonga_dpm.c drm/amdgpu: fix fw leak in non-powerplay dpm code 2016-06-09 10:48:56 -04:00
tonga_ih.c
tonga_ih.h
tonga_sdma_pkt_open.h
tonga_smc.c
tonga_smum.h
uvd_v4_2.c
uvd_v4_2.h
uvd_v5_0.c
uvd_v5_0.h
uvd_v6_0.c
uvd_v6_0.h
vce_v2_0.c
vce_v2_0.h
vce_v3_0.c
vce_v3_0.h
vi_dpm.h
vi.c amdgpu: fix asic initialization for virtualized environments (v2) 2016-06-13 15:25:20 -04:00
vi.h
vid.h