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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:06:23 +0000 (15:06 -0800)
commit8d5e1e5af0c667545c202e8f4051f77aa3bf31b7
tree792ad67b801cec85216bae8bbb70e8c30e8bbbeb
parentcb071fb6ace47b8422edd02ee91116d4f31c2c92
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/radeon/radeon_sa.c