All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: fix memory leak in msm_gem when no iommu is present
@ 2014-04-14 18:40 Micah Richert
  2014-04-14 19:41 ` Rob Clark
  0 siblings, 1 reply; 2+ messages in thread
From: Micah Richert @ 2014-04-14 18:40 UTC (permalink / raw)
  To: dri-devel; +Cc: Micah Richert

Signed-off-by: Micah Richert <richert@braincorporation.com>
---
 drivers/gpu/drm/msm/msm_gem.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index e8458bc..c818a06 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -118,8 +118,10 @@ static void put_pages(struct drm_gem_object *obj)
 
 		if (iommu_present(&platform_bus_type))
 			drm_gem_put_pages(obj, msm_obj->pages, true, false);
-		else
+		else {
 			drm_mm_remove_node(msm_obj->vram_node);
+			drm_free_large(msm_obj->pages);
+		}
 
 		msm_obj->pages = NULL;
 	}
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm: fix memory leak in msm_gem when no iommu is present
  2014-04-14 18:40 [PATCH] drm: fix memory leak in msm_gem when no iommu is present Micah Richert
@ 2014-04-14 19:41 ` Rob Clark
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Clark @ 2014-04-14 19:41 UTC (permalink / raw)
  To: Micah Richert; +Cc: dri-devel

fyi, I have this patch applied locally (well, actually the previous
one with slightly amended subject line).. was just waiting a bit to
see if any other fixes turned up before sending a fixes pull.  Thanks!

BR,
-R

On Mon, Apr 14, 2014 at 2:40 PM, Micah Richert
<richert@braincorporation.com> wrote:
> Signed-off-by: Micah Richert <richert@braincorporation.com>
> ---
>  drivers/gpu/drm/msm/msm_gem.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
> index e8458bc..c818a06 100644
> --- a/drivers/gpu/drm/msm/msm_gem.c
> +++ b/drivers/gpu/drm/msm/msm_gem.c
> @@ -118,8 +118,10 @@ static void put_pages(struct drm_gem_object *obj)
>
>                 if (iommu_present(&platform_bus_type))
>                         drm_gem_put_pages(obj, msm_obj->pages, true, false);
> -               else
> +               else {
>                         drm_mm_remove_node(msm_obj->vram_node);
> +                       drm_free_large(msm_obj->pages);
> +               }
>
>                 msm_obj->pages = NULL;
>         }
> --
> 1.8.3.2
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-14 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-14 18:40 [PATCH] drm: fix memory leak in msm_gem when no iommu is present Micah Richert
2014-04-14 19:41 ` Rob Clark

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.