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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 3 Mar 2016 11:46:04 +0000 (12:46 +0100)
commit40df18b49e7fe4ec9ab93f68c33661ee291149bd
treee4faaa247857a7e6a04970ff699a27e60e2dcf59
parente2f0c800e65090d8532040c4307a32fdf0c87343
drm/radeon: hold reference to fences in radeon_sa_bo_new

commit f6ff4f67cdf8455d0a4226eeeaf5af17c37d05eb upstream.

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/gpu/drm/radeon/radeon_sa.c