Skip to content

Commit

Permalink
drm/exynos: g2d: fix memory leak to userptr
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
daeinki authored and airlied committed Nov 21, 2013
1 parent 27946e9 commit c3bddbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/exynos/exynos_drm_g2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ static void g2d_userptr_put_dma_addr(struct drm_device *drm_dev,
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);

Expand Down

0 comments on commit c3bddbd

Please sign in to comment.