drm/exynos: g2d: fix memory leak to userptr
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Nov 22 17:59:11 EST 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=c3bddbda36a74225ad3d04aaa9600a25aff6b98b
Commit: c3bddbda36a74225ad3d04aaa9600a25aff6b98b
Parent: 27946e97108de281e0e9310965ac9a83a4aaa6fe
Author: Inki Dae <inki.dae at samsung.com>
AuthorDate: Thu Nov 21 12:09:51 2013 +0900
Committer: Dave Airlie <airlied at redhat.com>
CommitDate: Thu Nov 21 18:55:08 2013 +1000
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 at samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index 3271fd4..7bccedc 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -383,6 +383,8 @@ out:
g2d_userptr->npages,
g2d_userptr->vma);
+ exynos_gem_put_vma(g2d_userptr->vma);
+
if (!g2d_userptr->out_of_list)
list_del_init(&g2d_userptr->list);
More information about the linux-mtd-cvs
mailing list