mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 05:50:12 +01:00
amdgpu: Fix segfault in deadlock test.
If amdgpu_cs_query_fence_status terminates prematurely the BO sometimes is unmapped before helper thread writes a vlaue into it causing a segfault. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
This commit is contained in:
parent
5e239f3e3d
commit
429bb5820d
1 changed files with 2 additions and 2 deletions
|
|
@ -245,6 +245,8 @@ static void amdgpu_deadlock_helper(unsigned ip_type)
|
|||
AMDGPU_TIMEOUT_INFINITE,0, &expired);
|
||||
CU_ASSERT_EQUAL((r == 0 || r == -ECANCELED), 1);
|
||||
|
||||
pthread_join(stress_thread, NULL);
|
||||
|
||||
r = amdgpu_bo_list_destroy(bo_list);
|
||||
CU_ASSERT_EQUAL(r, 0);
|
||||
|
||||
|
|
@ -254,6 +256,4 @@ static void amdgpu_deadlock_helper(unsigned ip_type)
|
|||
|
||||
r = amdgpu_cs_ctx_free(context_handle);
|
||||
CU_ASSERT_EQUAL(r, 0);
|
||||
|
||||
pthread_join(stress_thread, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue