From: Christian König Date: Mon, 5 Aug 2013 12:10:56 +0000 (+0200) Subject: drm/radeon: stop sending invalid UVD destroy msg X-Git-Tag: v3.11-rc5~16^2~2^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=641a00593f7d07eab778fbabf546fb68fff3d5ce;p=profile%2Fivi%2Fkernel-x86-ivi.git drm/radeon: stop sending invalid UVD destroy msg We also need to check the handle. Signed-off-by: Christian König Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c index ca0d735..4fec195 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,