]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/exynos: g2d: fix memory leak to userptr
authorInki Dae <inki.dae@samsung.com>
Thu, 21 Nov 2013 03:09:51 +0000 (12:09 +0900)
committerDave Airlie <airlied@redhat.com>
Thu, 21 Nov 2013 08:55:08 +0000 (18:55 +1000)
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>
drivers/gpu/drm/exynos/exynos_drm_g2d.c

index 3271fd4b17240b5eca41f3cc66cecd0e2a5f7588..7bccedca487aebde1483ff08d65898e8d360c1c3 100644 (file)
@@ -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);