Hi Lucas,
On Wed, Jun 17, 2020 at 4:53 AM Lucas Stach wrote:
>
> Hi Navid,
>
> Am Montag, den 15.06.2020, 01:12 -0500 schrieb Navid Emamdoost:
> > in etnaviv_gpu_submit, etnaviv_gpu_recover_hang, etnaviv_gpu_debugfs,
> > and etnaviv_gpu_init the call to pm_run
in etnaviv_gpu_submit, etnaviv_gpu_recover_hang, etnaviv_gpu_debugfs,
and etnaviv_gpu_init the call to pm_runtime_get_sync increments the
counter even in case of failure, leading to incorrect ref count.
In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
in etnaviv_gpu_submit, etnaviv_gpu_recover_hang, etnaviv_gpu_debugfs,
and etnaviv_gpu_init the call to pm_runtime_get_sync increments the
counter even in case of failure, leading to incorrect ref count.
In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
On Sun, Jun 14, 2020 at 4:48 AM Andy Shevchenko
wrote:
>
> On Sun, Jun 14, 2020 at 9:48 AM Navid Emamdoost
> wrote:
>
> ...
>
> > + if (ret < 0) {
>
> > + pm_runtime_put(gpu->dev);
>
> Please, in all your patc
The call to pm_runtime_get_sync increments the counter even in case of
failure, leading to incorrect ref count.
In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 16
1 file changed
in vc4_dsi_encoder_enable, the call to pm_runtime_get_sync increments
the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/vc4/vc4_dsi.c | 10 ++
1 file
in amdgpu_driver_open_kms the call to pm_runtime_get_sync increments the
counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 ++-
1 file
On Sun, Jun 14, 2020 at 7:47 PM Inki Dae wrote:
>
> Hi,
>
> 20. 6. 14. 오후 3:23에 Navid Emamdoost 이(가) 쓴 글:
> > in mic_pre_enable, pm_runtime_get_sync is called which
> > increments the counter even in case of failure, leading to incorrect
> > ref count. In case of fa
in amdgpu_display_crtc_set_config, the call to pm_runtime_get_sync
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5
in mic_pre_enable, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
Changes in v2:
- reuse the unlock label and call
in vc4_v3d_pm_get, the call to pm_runtime_get_sync increments the
counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/vc4/vc4_v3d.c | 1 +
1 file changed, 1 insertion
in panfrost_perfcnt_enable_locked, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/panfrost/panfrost_perfcnt.c
in amdgpu_drm_ioctl the call to pm_runtime_get_sync increments the
counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
1 file changed, 2
in panfrost_job_hw_submit, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/panfrost/panfrost_job.c | 8 +---
1
On Sun, Jun 14, 2020 at 7:32 AM Andy Shevchenko
wrote:
>
> On Sun, Jun 14, 2020 at 9:55 AM Navid Emamdoost
> wrote:
> >
> > in vc4_dsi_encoder_enable, the call to pm_runtime_get_sync increments
> > the counter even in case of failure, leading to incorrect
> &
in vc4_vec_encoder_enable, the call to pm_runtime_get_sync increments
the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/vc4/vc4_vec.c | 8 +---
1 file changed
in mic_pre_enable, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/exynos/exynos_drm_mic.c | 2 +-
1 file changed
ping ...
On Thu, Nov 21, 2019 at 12:17 PM Navid Emamdoost
wrote:
>
> On Tue, Sep 24, 2019 at 11:38 PM Navid Emamdoost
> wrote:
> >
> > In vmw_cmdbuf_res_add if drm_ht_insert_item fails the allocated memory
> > for cres should be released.
> >
> > Signed
ping ...
On Tue, Nov 26, 2019 at 11:50 AM Navid Emamdoost
wrote:
>
> ping...
>
> On Thu, Nov 21, 2019 at 12:09 PM Navid Emamdoost
> wrote:
> >
> > On Mon, Oct 21, 2019 at 4:14 PM Navid Emamdoost
> > wrote:
> > >
> > > In the implementa
ping...
On Thu, Nov 21, 2019 at 12:09 PM Navid Emamdoost
wrote:
>
> On Mon, Oct 21, 2019 at 4:14 PM Navid Emamdoost
> wrote:
> >
> > In the implementation of nouveau_bo_alloc() if it fails to determine the
> > target page size via pi, then the allocated memory for
In the implementation of sync_file_merge() the allocated sync_file is
leaked if number of fences overflows. Release sync_file by goto err.
Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct
sync_file")
Signed-off-by: Navid Emamdoost
---
drivers/dma-buf/sync_
Thanks for the update.
On Fri, Nov 22, 2019 at 1:22 AM Marco Felsch wrote:
>
> Hi Navid,
>
> On 19-11-21 12:31, Navid Emamdoost wrote:
> > On Fri, Oct 4, 2019 at 2:09 PM Navid Emamdoost
> > wrote:
> > >
> > > In imx_pd_bind, the duplicated
On Fri, Oct 4, 2019 at 2:09 PM Navid Emamdoost
wrote:
>
> In imx_pd_bind, the duplicated memory for imxpd->edid via kmemdup should
> be released in drm_of_find_panel_or_bridge or imx_pd_register fail.
>
> Fixes: ebc944613567 ("drm: convert drivers to use
> drm_of_find
On Tue, Sep 24, 2019 at 11:38 PM Navid Emamdoost
wrote:
>
> In vmw_cmdbuf_res_add if drm_ht_insert_item fails the allocated memory
> for cres should be released.
>
> Signed-off-by: Navid Emamdoost
Would you please review this patch?
Thanks,
> ---
> drivers/gpu/drm/vmwgf
On Mon, Oct 21, 2019 at 4:14 PM Navid Emamdoost
wrote:
>
> In the implementation of nouveau_bo_alloc() if it fails to determine the
> target page size via pi, then the allocated memory for nvbo should be
> released.
>
> Fixes: 019cbd4a4feb ("drm/nouveau: Initialize GEM o
: Add an hx8367d tinydrm driver.")
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/tiny/hx8357d.c | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/tiny/hx8357d.c b/drivers/gpu/drm/tiny/hx8357d.c
index 9af8ff84974f..da5ec944f
On Tue, Oct 22, 2019 at 4:36 AM Daniel Vetter wrote:
>
> On Mon, Oct 21, 2019 at 01:52:49PM -0500, Navid Emamdoost wrote:
> > In the impelementation of v3d_submit_cl_ioctl() there are two memory
> > leaks. One is when allocation for bin fails, and the other is when bin
> &
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/g
In the implementation of nouveau_bo_alloc() if it fails to determine the
target page size via pi, then the allocated memory for nvbo should be
released.
Fixes: 019cbd4a4feb ("drm/nouveau: Initialize GEM object before TTM object")
Signed-off-by: Navid Emamdoost
---
drivers/gpu/d
t;base then allocated memory for bin should be released.
Fixes: a783a09ee76d ("drm/v3d: Refactor job management.")
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/v3d/v3d_gem.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/dri
On Sat, Oct 12, 2019 at 4:07 AM Markus Elfring wrote:
>
> From: Markus Elfring
> Date: Sat, 12 Oct 2019 10:30:21 +0200
>
> The return value from a call of the function “kmemdup” was not checked
> in this function implementation. Thus add the corresponding error handling.
>
> Fixes:
No, that is not correct! You should not try to free imxpd here as it
is a resource-managed allocation via devm_kzalloc(). It means memory
allocated with this function is automatically freed on driver detach.
So, this patch introduces a double-free.
On Sat, Oct 12, 2019 at 6:54 AM Markus Elfring
Hi Markus,
I agree with you, kmemdup may fail so a null check seems necessary there.
On Sun, Oct 6, 2019 at 4:33 AM Markus Elfring wrote:
>
> I have taken another look also at the implementation of the function
> “imx_pd_bind”.
>
el display support")
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/imx/parallel-display.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/imx/parallel-display.c
b/drivers/gpu/drm/imx/parallel-display.c
index e7ce17503ae1..9522d2cb0ad5 100644
--
Would you please review this patch?
Thanks,
Navid.
On Mon, Sep 16, 2019 at 10:21 PM Navid Emamdoost
wrote:
>
> In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated
> clk_src needs release.
>
> Signed-off-by: Navid Emamdoost
> ---
> drivers/gpu/drm/
g_devices or pm_genpd_add_device fail.
3- Release is needed in case of time out values expire.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 34 -
1 file changed, 22 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu
On Tue, Oct 1, 2019 at 7:19 AM Koenig, Christian
wrote:
>
> Am 30.09.19 um 23:26 schrieb Navid Emamdoost:
> > In acp_hw_init there are some allocations that needs to be released in
> > case of failure:
> >
> > 1- adev->acp.acp_genpd should be released if a
g_devices or pm_genpd_add_device fail.
3- Release is needed in case of time out values expire.
Signed-off-by: Navid Emamdoost
---
Changes in v2:
-- moved the releases under goto
Changes in v3:
-- fixed multiple goto issue
-- added goto for 3 other failure cases:
On Thu, Sep 19, 2019 at 3:03 AM Koenig, Christian
wrote:
>
> Am 18.09.19 um 21:05 schrieb Navid Emamdoost:
> > In acp_hw_init there are some allocations that needs to be released in
> > case of failure:
> >
> > 1- adev->acp.acp_genpd should be released if a
Signed-off-by: Navid Emamdoost
---
drivers/staging/fbtft/fbtft-core.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-core.c
b/drivers/staging/fbtft/fbtft-core.c
index cf5700a2ea66..a0a67aa517f0 100644
--- a/drivers/staging/fbtft/fbtft-co
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 1 +
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 1 +
drivers/gpu/drm/amd/display/dc/dce112
In vmw_context_define if vmw_context_init fails the allocated resource
should be unreferenced. The goto label was fixed.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vmwgfx
In vmw_cmdbuf_res_add if drm_ht_insert_item fails the allocated memory
for cres should be released.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
b
In komeda_wb_connector_add if drm_writeback_connector_init fails the
allocated memory for kwb_conn should be released.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu
In amdgpu_vmid_grab_idle, fences is being leaked in one execution path.
The missing kfree was added.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
b/drivers/gpu/drm/amd
ails.
v2: moved the released into goto error handlings
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 30 +
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
b/drivers/gpu/drm/a
Thanks Christian for the feedback, I'll send a v2.
On Wed, Sep 18, 2019 at 12:31 PM Koenig, Christian
wrote:
> Am 18.09.19 um 18:09 schrieb Navid Emamdoost:
> > In acp_hw_init there are some allocations that needs to be released in
> > case of failure:
> >
> > 1-
ice
fails.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
index eba42c752bca..dd3fa85b11c5 100644
--- a/driver
In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated
clk_src needs release.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 3 ++-
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 1 +
drivers/gpu/drm/amd/display/dc
The following function calls may fail and return NULL, so the null check
is added.
of_graph_get_next_endpoint
of_graph_get_remote_port_parent
of_graph_get_remote_port
Update: Thanks to Sam Ravnborg, for suggession on the use of goto to avoid
leaking endpoint.
Signed-off-by: Navid Emamdoost
The following function calls may fail and return NULL, so the null check
is added.
of_graph_get_next_endpoint
of_graph_get_remote_port_parent
of_graph_get_remote_port
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 9 +
1 file changed, 9
of_graph_get_next_endpoint may return NULL, so null check is needed.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
b/drivers/gpu/drm/panel
52 matches
Mail list logo