Re: [PATCH] drm/amdgpu: fix memory leak in amdgpu_fru_get_product_info()

2023-09-22 Thread Luben Tuikov
On 2023-09-22 16:58, Luben Tuikov wrote: > On 2023-09-22 01:27, Yang Wang wrote: >> fix a memory leak that occurs when csum is 0, >> the origin function will return directly and forgets to free 'pia' resource. >> >> Fixes: 0dbf2c562625 ("drm/amdgpu: Interpret IPMI data for product >> information (

Re: [PATCH] drm/amdgpu: fix memory leak in amdgpu_fru_get_product_info()

2023-09-22 Thread Luben Tuikov
On 2023-09-22 01:27, Yang Wang wrote: > fix a memory leak that occurs when csum is 0, > the origin function will return directly and forgets to free 'pia' resource. > > Fixes: 0dbf2c562625 ("drm/amdgpu: Interpret IPMI data for product information > (v2)") > > CC: Luben Tuikov > Signed-off-by: Y

Re: [PATCH] drm/amdgpu: fix memory leak in amdgpu_fru_get_product_info()

2023-09-22 Thread Luben Tuikov
On 2023-09-22 01:27, Yang Wang wrote: > fix a memory leak that occurs when csum is 0, > the origin function will return directly and forgets to free 'pia' resource. > > Fixes: 0dbf2c562625 ("drm/amdgpu: Interpret IPMI data for product information > (v2)") > > CC: Luben Tuikov > Signed-off-by: Y

Re: [PATCH] drm/amdgpu: fix memory leak in amdgpu_fru_get_product_info()

2023-09-22 Thread Alex Deucher
On Fri, Sep 22, 2023 at 2:06 AM Yang Wang wrote: > > fix a memory leak that occurs when csum is 0, > the origin function will return directly and forgets to free 'pia' resource. > > Fixes: 0dbf2c562625 ("drm/amdgpu: Interpret IPMI data for product information > (v2)") > > CC: Luben Tuikov > Sign

[PATCH] drm/amdgpu: fix memory leak in amdgpu_fru_get_product_info()

2023-09-21 Thread Yang Wang
fix a memory leak that occurs when csum is 0, the origin function will return directly and forgets to free 'pia' resource. Fixes: 0dbf2c562625 ("drm/amdgpu: Interpret IPMI data for product information (v2)") CC: Luben Tuikov Signed-off-by: Yang Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_fru_e

Re: [PATCH] drm/amdgpu: fix memory leak in mes self test

2023-04-21 Thread Christian König
Am 21.04.23 um 09:06 schrieb Jack Xiao: The fences associated with mes queue have to be freed up during amdgpu_ring_fini. Signed-off-by: Jack Xiao Well big NAK to this! The fences are supposed to be freed by the fence handling code. Christian. --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring

RE: [PATCH] drm/amdgpu: fix memory leak in mes self test

2023-04-21 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Xiao, Jack Sent: Friday, April 21, 2023 15:06 To: amd-gfx@lists.freedesktop.org; Zhang, Hawking Cc: Xiao, Jack Subject: [PATCH] drm/amdgpu: fix memory leak in mes self test The

[PATCH] drm/amdgpu: fix memory leak in mes self test

2023-04-21 Thread Jack Xiao
The fences associated with mes queue have to be freed up during amdgpu_ring_fini. Signed-off-by: Jack Xiao --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index

Re: [PATCH] drm/amdgpu: Fix memory leak in amdgpu_cs_pass1

2022-11-11 Thread Christian König
Am 10.11.22 um 15:33 schrieb Dong Chenchen: When p->gang_size equals 0, amdgpu_cs_pass1() will return directly without freeing chunk_array, which will cause a memory leak issue, this patch fixes it. Fixes: 4624459c84d7 ("drm/amdgpu: add gang submit frontend v6") Signed-off-by: Dong Chenchen G

Re: [PATCH] drm/amdgpu: Fix memory leak in amdgpu_cs_pass1

2022-11-10 Thread Alex Deucher
On Thu, Nov 10, 2022 at 1:08 PM Luben Tuikov wrote: > > Thanks for fixing this. > > Please add a Cc tag to stable, and repost. No need for stable. This patch just went upstream in 6.1, so I can include it in my 6.1 fixes pull next week. Applied. Thanks! Alex > > Reviewed-by: Luben Tuikov >

Re: [PATCH] drm/amdgpu: Fix memory leak in amdgpu_cs_pass1

2022-11-10 Thread Luben Tuikov
Thanks for fixing this. Please add a Cc tag to stable, and repost. Reviewed-by: Luben Tuikov Regards, Luben On 2022-11-10 09:33, Dong Chenchen wrote: > When p->gang_size equals 0, amdgpu_cs_pass1() will return directly > without freeing chunk_array, which will cause a memory leak issue, > this

[PATCH] drm/amdgpu: Fix memory leak in amdgpu_cs_pass1

2022-11-10 Thread Dong Chenchen
When p->gang_size equals 0, amdgpu_cs_pass1() will return directly without freeing chunk_array, which will cause a memory leak issue, this patch fixes it. Fixes: 4624459c84d7 ("drm/amdgpu: add gang submit frontend v6") Signed-off-by: Dong Chenchen --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +

Re: [PATCH] drm/amdgpu: Fix memory leak in hpd_rx_irq_create_workqueue()

2022-09-13 Thread Alex Deucher
Applied. Thanks! On Mon, Sep 12, 2022 at 10:12 PM Rafael Mendonca wrote: > > If construction of the array of work queues to handle hpd_rx_irq offload > work fails, we need to unwind. Destroy all the created workqueues and > the allocated memory for the hpd_rx_irq_offload_work_queue struct array.

[PATCH] drm/amdgpu: Fix memory leak in hpd_rx_irq_create_workqueue()

2022-09-12 Thread Rafael Mendonca
If construction of the array of work queues to handle hpd_rx_irq offload work fails, we need to unwind. Destroy all the created workqueues and the allocated memory for the hpd_rx_irq_offload_work_queue struct array. Fixes: 8e794421bc98 ("drm/amd/display: Fork thread to offload work of hpd_rx_irq"

Re: [PATCH] drm/amdgpu: Fix memory leak

2021-03-17 Thread Alex Deucher
On Wed, Mar 17, 2021 at 5:56 AM xinhui pan wrote: > > drm_gem_object_put() should be paired with drm_gem_object_lookup(). > > All gem objs are saved in fb->base.obj[]. Need put the old first before > assign a new obj. > > Trigger VRAM leak by running command below > $ service gdm restart > > Signe

[PATCH] drm/amdgpu: Fix memory leak

2021-03-17 Thread xinhui pan
drm_gem_object_put() should be paired with drm_gem_object_lookup(). All gem objs are saved in fb->base.obj[]. Need put the old first before assign a new obj. Trigger VRAM leak by running command below $ service gdm restart Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_display

[PATCH] drm/amdgpu: Fix memory leak in amdgpu_fence_emit

2019-10-22 Thread Navid Emamdoost
In the impelementation of amdgpu_fence_emit() if dma_fence_wait() fails and returns an errno, before returning the allocated memory for fence should be released. Fixes: 3d2aca8c8620 ("drm/amdgpu: fix old fence check in amdgpu_fence_emit") Signed-off-by: Navid Emamdoost --- drivers/gpu/drm/amd/am

Re: [PATCH] drm/amdgpu: Fix memory leak in amdgpu_fence_emit

2019-10-21 Thread Koenig, Christian
Am 21.10.19 um 20:09 schrieb Navid Emamdoost: > In the impelementation of amdgpu_fence_emit() if dma_fence_wait() fails > and returns an errno, before returning the allocated memory for fence > should be released. > > Fixes: 3d2aca8c8620 ("drm/amdgpu: fix old fence check in amdgpu_fence_emit") > Si

Re: [PATCH] drm/amdgpu: fix memory leak

2019-10-04 Thread Koenig, Christian
Am 04.10.19 um 15:51 schrieb Nirmoy Das: > cleanup error handling code and make sure temporary info array > with the handles are freed by amdgpu_bo_list_put() on > idr_replace()'s failure. > > Signed-off-by: Nirmoy Das Reviewed-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_bo_

[PATCH] drm/amdgpu: fix memory leak

2019-10-04 Thread Nirmoy Das
cleanup error handling code and make sure temporary info array with the handles are freed by amdgpu_bo_list_put() on idr_replace()'s failure. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

Re: [PATCH] drm/amdgpu: fix memory leak in wait_all_fence

2017-04-07 Thread zhoucm1
On 2017年04月07日 16:55, Christian König wrote: Am 07.04.2017 um 10:46 schrieb zhoucm1: On 2017年04月07日 16:36, Christian König wrote: Am 07.04.2017 um 05:36 schrieb Chunming Zhou: Change-Id: Ib3e271e00e49f10152c1b3eace981a6bf78820de Signed-off-by: Chunming Zhou NAK, that will allocate an ar

Re: [PATCH] drm/amdgpu: fix memory leak in wait_all_fence

2017-04-07 Thread Christian König
Am 07.04.2017 um 10:46 schrieb zhoucm1: On 2017年04月07日 16:36, Christian König wrote: Am 07.04.2017 um 05:36 schrieb Chunming Zhou: Change-Id: Ib3e271e00e49f10152c1b3eace981a6bf78820de Signed-off-by: Chunming Zhou NAK, that will allocate an array for the fence again, which we wanted to avo

Re: [PATCH] drm/amdgpu: fix memory leak in wait_all_fence

2017-04-07 Thread zhoucm1
On 2017年04月07日 16:36, Christian König wrote: Am 07.04.2017 um 05:36 schrieb Chunming Zhou: Change-Id: Ib3e271e00e49f10152c1b3eace981a6bf78820de Signed-off-by: Chunming Zhou NAK, that will allocate an array for the fence again, which we wanted to avoid. I don't got your means, the **array j

Re: [PATCH] drm/amdgpu: fix memory leak in wait_all_fence

2017-04-07 Thread Christian König
Am 07.04.2017 um 05:36 schrieb Chunming Zhou: Change-Id: Ib3e271e00e49f10152c1b3eace981a6bf78820de Signed-off-by: Chunming Zhou NAK, that will allocate an array for the fence again, which we wanted to avoid. We should just drop the fence reference directly after waiting for it. Regards, Ch

答复: [PATCH] drm/amdgpu: fix memory leak in wait_all_fence

2017-04-06 Thread Wang, Ken
Reviewed-by: Ken Wang 发件人: amd-gfx 代表 Chunming Zhou 发送时间: 2017年4月7日 11:36:18 收件人: amd-gfx@lists.freedesktop.org; Wang, Ken 抄送: Zhou, David(ChunMing) 主题: [PATCH] drm/amdgpu: fix memory leak in wait_all_fence Change-Id: Ib3e271e00e49f10152c1b3eace981a6bf78820de

[PATCH] drm/amdgpu: fix memory leak in wait_all_fence

2017-04-06 Thread Chunming Zhou
Change-Id: Ib3e271e00e49f10152c1b3eace981a6bf78820de Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_c

Re: [PATCH] drm/amdgpu: fix memory leak in psp

2017-03-28 Thread Huang Rui
On Tue, Mar 28, 2017 at 05:16:09PM +0800, Ken Wang wrote: > Change-Id: I6bea247f41ea405d11c1d75ca97b789f6970b191 > Signed-off-by: Ken Wang Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --gi

Re: [PATCH] drm/amdgpu: fix memory leak in psp

2017-03-28 Thread Christian König
Am 28.03.2017 um 11:16 schrieb Ken Wang: Change-Id: I6bea247f41ea405d11c1d75ca97b789f6970b191 Signed-off-by: Ken Wang I don't know the PSP code to well, but that looks correct to me on first glance. Patch is Acked-by: Christian König . Regards, Christian. --- drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: fix memory leak in psp

2017-03-28 Thread Ken Wang
Change-Id: I6bea247f41ea405d11c1d75ca97b789f6970b191 Signed-off-by: Ken Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 89d1d