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)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 4 Mar 2016 15:18:40 +0000 (10:18 -0500)
commit647e40c69aff11bf5cf73a92d15a91439fe38ae9
treea0d8fe8e80fc5c974e10665b1fa791fd557481ac
parent97e8007ccee791c1eddb3822c1597979cbe8a45e
drm/radeon: hold reference to fences in radeon_sa_bo_new

[ Upstream commit f6ff4f67cdf8455d0a4226eeeaf5af17c37d05eb ]

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
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/gpu/drm/radeon/radeon_sa.c