mesa-drm/tests/amdgpu
Michel Dänzer 6fe93b8000 amdgpu: Don't dereference device_handle after amdgpu_device_deinitialize
Fixes use after free:

==2537== Invalid read of size 4
==2537==    at 0x1162C9: suite_deadlock_tests_enable (deadlock_tests.c:101)
==2537==    by 0x10B157: amdgpu_disable_suits (amdgpu_test.c:421)
==2537==    by 0x10B157: main (amdgpu_test.c:560)
==2537==  Address 0x5e44f24 is 452 bytes inside a block of size 1,016 free'd
==2537==    at 0x4C2BE1B: free (vg_replace_malloc.c:530)
==2537==    by 0x504CD8B: amdgpu_device_reference (amdgpu_device.c:164)
==2537==    by 0x504CD8B: amdgpu_device_deinitialize (amdgpu_device.c:307)
==2537==    by 0x1162BB: suite_deadlock_tests_enable (deadlock_tests.c:97)
==2537==    by 0x10B157: amdgpu_disable_suits (amdgpu_test.c:421)
==2537==    by 0x10B157: main (amdgpu_test.c:560)
==2537==  Block was alloc'd at
==2537==    at 0x4C2CC05: calloc (vg_replace_malloc.c:711)
==2537==    by 0x504CA5E: amdgpu_device_initialize (amdgpu_device.c:212)
==2537==    by 0x116298: suite_deadlock_tests_enable (deadlock_tests.c:93)
==2537==    by 0x10B157: amdgpu_disable_suits (amdgpu_test.c:421)
==2537==    by 0x10B157: main (amdgpu_test.c:560)

Reviewed-by: Christian König <christian.koenig@amd.com>
2018-01-16 16:57:57 +01:00
..
amdgpu_test.c amdgpu: Add explicit dependency test. 2017-11-30 14:51:12 -05:00
amdgpu_test.h amdgpu: Switch amdgpu CS tests enabling to the new way. 2017-11-29 10:31:00 -05:00
basic_tests.c tests/amdgpu: execute copy linear on all the available rings 2018-01-12 12:17:24 -05:00
bo_tests.c amdgpu: Dynamicly disable BO suite "Metadata" test. 2017-11-29 10:31:10 -05:00
cs_tests.c amdgpu: Switch amdgpu CS tests enabling to the new way. 2017-11-29 10:31:00 -05:00
deadlock_tests.c amdgpu: Don't dereference device_handle after amdgpu_device_deinitialize 2018-01-16 16:57:57 +01:00
decode_messages.h tests/amdgpu: implement vcn dec unit tests 2017-06-05 10:41:13 -04:00
frame.h tests/amdgpu: add uvd encode unit tests 2017-08-16 16:16:50 -04:00
Makefile.am amdgpu: Add VMID reservation per GPU context test. 2017-10-27 18:26:08 +02:00
meson.build Add meson build system 2018-01-12 09:40:48 -08:00
uvd_enc_tests.c amdgpu: Use new suite/test disabling functionality. 2017-11-13 18:20:22 +01:00
uve_ib.h tests/amdgpu: fix uvd enc data corruption issue 2017-10-06 09:40:06 -04:00
vce_ib.h tests/amdgpu: update vce encRefPic addr mode to tiled 2016-09-30 14:28:03 -04:00
vce_tests.c amdgpu: Use new suite/test disabling functionality. 2017-11-13 18:20:22 +01:00
vcn_tests.c tests/amdgpu: Add return CUE_SUCCESS to suite_vcn_tests_clean. 2017-12-15 13:30:53 -05:00
vm_tests.c amdgpu: Fix wrappers for AMDGPU_VM IOCTL. 2017-11-03 13:07:30 +01:00