diff options
author | Christian König <christian.koenig@amd.com> | 2013-08-05 16:10:56 +0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-08-08 01:37:15 +0400 |
commit | 641a00593f7d07eab778fbabf546fb68fff3d5ce (patch) | |
tree | 216c55be8f64685604f04287f0f422b27c042073 /drivers | |
parent | 4ad9c1c774c2af152283f510062094e768876f55 (diff) | |
download | linux-641a00593f7d07eab778fbabf546fb68fff3d5ce.tar.xz |
drm/radeon: stop sending invalid UVD destroy msg
We also need to check the handle.
Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_uvd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c index ca0d7358ed33..4fec195e0dd4 100644 --- a/drivers/gpu/drm/radeon/radeon_uvd.c +++ b/drivers/gpu/drm/radeon/radeon_uvd.c @@ -235,8 +235,8 @@ void radeon_uvd_free_handles(struct radeon_device *rdev, struct drm_file *filp) { int i, r; for (i = 0; i < RADEON_MAX_UVD_HANDLES; ++i) { - if (rdev->uvd.filp[i] == filp) { - uint32_t handle = atomic_read(&rdev->uvd.handles[i]); + uint32_t handle = atomic_read(&rdev->uvd.handles[i]); + if (handle != 0 && rdev->uvd.filp[i] == filp) { struct radeon_fence *fence; r = radeon_uvd_get_destroy_msg(rdev, |