summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2013-08-05 14:10:56 +0200
committerAlex Deucher <alexander.deucher@amd.com>2013-08-07 17:37:15 -0400
commit641a00593f7d07eab778fbabf546fb68fff3d5ce (patch)
tree216c55be8f64685604f04287f0f422b27c042073 /drivers/gpu/drm
parent4ad9c1c774c2af152283f510062094e768876f55 (diff)
downloadop-kernel-dev-641a00593f7d07eab778fbabf546fb68fff3d5ce.zip
op-kernel-dev-641a00593f7d07eab778fbabf546fb68fff3d5ce.tar.gz
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/gpu/drm')
-rw-r--r--drivers/gpu/drm/radeon/radeon_uvd.c4
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 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,
OpenPOWER on IntegriCloud