drm/radeon: hold reference to fences in radeon_sa_bo_new
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 5 Feb 2016 19:35:53 +0000 (14:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Feb 2016 19:07:44 +0000 (14:07 -0500)
commitf6ff4f67cdf8455d0a4226eeeaf5af17c37d05eb
treeaf5411ce6dd25d290d0e56c731cdd12ed63660aa
parentb19763d0d867eb863953500a5c87f2fd663863b8
drm/radeon: hold reference to fences in radeon_sa_bo_new

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

Based on the analogous fix for amdgpu.

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