All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/ttm: fix memleak in ttm_transfered_destroy
@ 2021-10-20 17:32 Christian König
  2021-10-20 17:43 ` Alex Deucher
  0 siblings, 1 reply; 5+ messages in thread
From: Christian König @ 2021-10-20 17:32 UTC (permalink / raw)
  To: dri-devel

We need to cleanup the fences for ghost objects as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
CC: <stable@vger.kernel.org>
---
 drivers/gpu/drm/ttm/ttm_bo_util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 82af095f6b81..f37a8c53b35f 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -190,6 +190,7 @@ static void ttm_transfered_destroy(struct ttm_buffer_object *bo)
 	struct ttm_transfer_obj *fbo;
 
 	fbo = container_of(bo, struct ttm_transfer_obj, base);
+	dma_resv_fini(&fbo->base.base._resv);
 	ttm_bo_put(fbo->bo);
 	kfree(fbo);
 }
-- 
2.25.1


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

* Re: [PATCH] drm/ttm: fix memleak in ttm_transfered_destroy
  2021-10-20 17:32 [PATCH] drm/ttm: fix memleak in ttm_transfered_destroy Christian König
@ 2021-10-20 17:43 ` Alex Deucher
  2021-10-20 17:47   ` Christian König
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Deucher @ 2021-10-20 17:43 UTC (permalink / raw)
  To: Christian König; +Cc: Maling list - DRI developers

On Wed, Oct 20, 2021 at 1:32 PM Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
>
> We need to cleanup the fences for ghost objects as well.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> CC: <stable@vger.kernel.org>

Does this fix this bug?
https://bugzilla.kernel.org/show_bug.cgi?id=214029

Alex

> ---
>  drivers/gpu/drm/ttm/ttm_bo_util.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
> index 82af095f6b81..f37a8c53b35f 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
> @@ -190,6 +190,7 @@ static void ttm_transfered_destroy(struct ttm_buffer_object *bo)
>         struct ttm_transfer_obj *fbo;
>
>         fbo = container_of(bo, struct ttm_transfer_obj, base);
> +       dma_resv_fini(&fbo->base.base._resv);
>         ttm_bo_put(fbo->bo);
>         kfree(fbo);
>  }
> --
> 2.25.1
>

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

* Re: [PATCH] drm/ttm: fix memleak in ttm_transfered_destroy
  2021-10-20 17:43 ` Alex Deucher
@ 2021-10-20 17:47   ` Christian König
  2021-10-21  9:05     ` Christian König
  0 siblings, 1 reply; 5+ messages in thread
From: Christian König @ 2021-10-20 17:47 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Maling list - DRI developers

Am 20.10.21 um 19:43 schrieb Alex Deucher:
> On Wed, Oct 20, 2021 at 1:32 PM Christian König
> <ckoenig.leichtzumerken@gmail.com> wrote:
>> We need to cleanup the fences for ghost objects as well.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> CC: <stable@vger.kernel.org>
> Does this fix this bug?
> https://bugzilla.kernel.org/show_bug.cgi?id=214029

Yeah, I was already adding that patch to the bug report as potential fix.

Christian.

>
> Alex
>
>> ---
>>   drivers/gpu/drm/ttm/ttm_bo_util.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
>> index 82af095f6b81..f37a8c53b35f 100644
>> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
>> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
>> @@ -190,6 +190,7 @@ static void ttm_transfered_destroy(struct ttm_buffer_object *bo)
>>          struct ttm_transfer_obj *fbo;
>>
>>          fbo = container_of(bo, struct ttm_transfer_obj, base);
>> +       dma_resv_fini(&fbo->base.base._resv);
>>          ttm_bo_put(fbo->bo);
>>          kfree(fbo);
>>   }
>> --
>> 2.25.1
>>


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

* Re: [PATCH] drm/ttm: fix memleak in ttm_transfered_destroy
  2021-10-20 17:47   ` Christian König
@ 2021-10-21  9:05     ` Christian König
  2021-10-21  9:10       ` Huang, Ray
  0 siblings, 1 reply; 5+ messages in thread
From: Christian König @ 2021-10-21  9:05 UTC (permalink / raw)
  To: Alex Deucher, Huang Rui; +Cc: Maling list - DRI developers



Am 20.10.21 um 19:47 schrieb Christian König:
> Am 20.10.21 um 19:43 schrieb Alex Deucher:
>> On Wed, Oct 20, 2021 at 1:32 PM Christian König
>> <ckoenig.leichtzumerken@gmail.com> wrote:
>>> We need to cleanup the fences for ghost objects as well.
>>>
>>> Signed-off-by: Christian König <christian.koenig@amd.com>
>>> CC: <stable@vger.kernel.org>
>> Does this fix this bug?
>> https://bugzilla.kernel.org/show_bug.cgi?id=214029
>
> Yeah, I was already adding that patch to the bug report as potential fix.

Ok that indeed fixes the issues we were seeing.

Can I get an acked or reviewed-by so that I can push this to 
drm-misc-fixes ASAP?

Thanks,
Christian.

>
> Christian.
>
>>
>> Alex
>>
>>> ---
>>>   drivers/gpu/drm/ttm/ttm_bo_util.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c 
>>> b/drivers/gpu/drm/ttm/ttm_bo_util.c
>>> index 82af095f6b81..f37a8c53b35f 100644
>>> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
>>> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
>>> @@ -190,6 +190,7 @@ static void ttm_transfered_destroy(struct 
>>> ttm_buffer_object *bo)
>>>          struct ttm_transfer_obj *fbo;
>>>
>>>          fbo = container_of(bo, struct ttm_transfer_obj, base);
>>> +       dma_resv_fini(&fbo->base.base._resv);
>>>          ttm_bo_put(fbo->bo);
>>>          kfree(fbo);
>>>   }
>>> -- 
>>> 2.25.1
>>>
>


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

* RE: [PATCH] drm/ttm: fix memleak in ttm_transfered_destroy
  2021-10-21  9:05     ` Christian König
@ 2021-10-21  9:10       ` Huang, Ray
  0 siblings, 0 replies; 5+ messages in thread
From: Huang, Ray @ 2021-10-21  9:10 UTC (permalink / raw)
  To: Christian König, Alex Deucher; +Cc: Maling list - DRI developers, Yu, Lang

[AMD Official Use Only]

> -----Original Message-----
> From: Christian König <ckoenig.leichtzumerken@gmail.com>
> Sent: Thursday, October 21, 2021 5:06 PM
> To: Alex Deucher <alexdeucher@gmail.com>; Huang, Ray
> <Ray.Huang@amd.com>
> Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
> Subject: Re: [PATCH] drm/ttm: fix memleak in ttm_transfered_destroy
> 
> 
> 
> Am 20.10.21 um 19:47 schrieb Christian König:
> > Am 20.10.21 um 19:43 schrieb Alex Deucher:
> >> On Wed, Oct 20, 2021 at 1:32 PM Christian König
> >> <ckoenig.leichtzumerken@gmail.com> wrote:
> >>> We need to cleanup the fences for ghost objects as well.
> >>>
> >>> Signed-off-by: Christian König <christian.koenig@amd.com>
> >>> CC: <stable@vger.kernel.org>
> >> Does this fix this bug?
> >>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbug
> >>
> zilla.kernel.org%2Fshow_bug.cgi%3Fid%3D214029&amp;data=04%7C01%7C
> ray.
> >>
> huang%40amd.com%7C2649abcb898e44a70a2908d99471fded%7C3dd8961f
> e4884e60
> >>
> 8e11a82d994e183d%7C0%7C0%7C637704039590182871%7CUnknown%7CT
> WFpbGZsb3d
> >>
> 8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
> 3D%7
> >>
> C1000&amp;sdata=M2sEOCDiZIr8mGuOHQNFGPNi93kp6HcrAS1hjxy79r8%3
> D&amp;re
> >> served=0
> >
> > Yeah, I was already adding that patch to the bug report as potential fix.
> 
> Ok that indeed fixes the issues we were seeing.
> 
> Can I get an acked or reviewed-by so that I can push this to drm-misc-fixes
> ASAP?
> 

Reviewed-by: Huang Rui <ray.huang@amd.com>

(+ Lang), he is debugging a similar issue as well.

> Thanks,
> Christian.
> 
> >
> > Christian.
> >
> >>
> >> Alex
> >>
> >>> ---
> >>>   drivers/gpu/drm/ttm/ttm_bo_util.c | 1 +
> >>>   1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c
> >>> b/drivers/gpu/drm/ttm/ttm_bo_util.c
> >>> index 82af095f6b81..f37a8c53b35f 100644
> >>> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
> >>> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
> >>> @@ -190,6 +190,7 @@ static void ttm_transfered_destroy(struct
> >>> ttm_buffer_object *bo)
> >>>          struct ttm_transfer_obj *fbo;
> >>>
> >>>          fbo = container_of(bo, struct ttm_transfer_obj, base);
> >>> +       dma_resv_fini(&fbo->base.base._resv);
> >>>          ttm_bo_put(fbo->bo);
> >>>          kfree(fbo);
> >>>   }
> >>> --
> >>> 2.25.1
> >>>
> >

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

end of thread, other threads:[~2021-10-21  9:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 17:32 [PATCH] drm/ttm: fix memleak in ttm_transfered_destroy Christian König
2021-10-20 17:43 ` Alex Deucher
2021-10-20 17:47   ` Christian König
2021-10-21  9:05     ` Christian König
2021-10-21  9:10       ` Huang, Ray

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.