diff options
author | Inki Dae <inki.dae@samsung.com> | 2013-11-20 22:09:51 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-11-21 03:55:08 -0500 |
commit | c3bddbda36a74225ad3d04aaa9600a25aff6b98b (patch) | |
tree | aa140be3e7f14fa47ae84ccb955187d631ae8f09 | |
parent | 27946e97108de281e0e9310965ac9a83a4aaa6fe (diff) |
drm/exynos: g2d: fix memory leak to userptr
This patch releases a vma object when cleaning up userptr resources.
A new vma object was allocated and copied when getting userptr pages
so the new vma object should be freed properly if the userptr pages
aren't used anymore.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 3271fd4b1724..7bccedca487a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c | |||
@@ -383,6 +383,8 @@ out: | |||
383 | g2d_userptr->npages, | 383 | g2d_userptr->npages, |
384 | g2d_userptr->vma); | 384 | g2d_userptr->vma); |
385 | 385 | ||
386 | exynos_gem_put_vma(g2d_userptr->vma); | ||
387 | |||
386 | if (!g2d_userptr->out_of_list) | 388 | if (!g2d_userptr->out_of_list) |
387 | list_del_init(&g2d_userptr->list); | 389 | list_del_init(&g2d_userptr->list); |
388 | 390 | ||