diff options
author | Kristian Høgsberg <krh@redhat.com> | 2009-02-12 14:37:56 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-19 21:21:11 -0500 |
commit | ea39f835168f60b01e59d0f348da25d297e7cf94 (patch) | |
tree | 79a5f3cef511245789ab2e5b7c295b6693861b32 /drivers/gpu/drm/drm_fops.c | |
parent | b4476f52e43fadcb9402723a1a55ba1308757525 (diff) |
drm: Release user fbs in drm_release
Avoids leaking fbs and associated buffers on release.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Tested-by: Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/gpu/drm/drm_fops.c')
-rw-r--r-- | drivers/gpu/drm/drm_fops.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index b06a53715853..6c020fe5431c 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
@@ -457,6 +457,9 @@ int drm_release(struct inode *inode, struct file *filp) | |||
457 | if (dev->driver->driver_features & DRIVER_GEM) | 457 | if (dev->driver->driver_features & DRIVER_GEM) |
458 | drm_gem_release(dev, file_priv); | 458 | drm_gem_release(dev, file_priv); |
459 | 459 | ||
460 | if (dev->driver->driver_features & DRIVER_MODESET) | ||
461 | drm_fb_release(file_priv); | ||
462 | |||
460 | mutex_lock(&dev->ctxlist_mutex); | 463 | mutex_lock(&dev->ctxlist_mutex); |
461 | if (!list_empty(&dev->ctxlist)) { | 464 | if (!list_empty(&dev->ctxlist)) { |
462 | struct drm_ctx_list *pos, *n; | 465 | struct drm_ctx_list *pos, *n; |