]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: hold reference to fences in amdgpu_sa_bo_new (v2)
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 5 Feb 2016 15:59:43 +0000 (10:59 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Feb 2016 19:07:31 +0000 (14:07 -0500)
commit9a682aaca1bce926d1dd51324c854247f6c7bc1b
treefb6460edb485890a55b6a101751812abcfb0b7c1
parent50bc4646ab900af398910aedaa26bb9118ee09fb
drm/amdgpu: hold reference to fences in amdgpu_sa_bo_new (v2)

An arbitrary amount of time can pass between spin_unlock and
fence_wait_any_timeout, so we need to ensure that nobody frees the
fences from under us.

A stress test (rapidly starting and killing hundreds of glxgears
instances) ran into a deadlock in fence_wait_any_timeout after
about an hour, and this race condition appears to be a plausible
cause.

v2: agd: rebase on upstream

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c