Re: [PATCH] drm/nouveau/gr/gf100: Fix missing unlock in gf100_gr_chan_new()

2024-10-30 Thread Li Huafei
On 2024/10/30 2:42, Lyude Paul wrote: > Reviewed-by: Lyude Paul > > Will push upstream in a moment > Thank you for reviewing. Thanks, Huafei > On Sun, 2024-10-27 at 01:38 +0800, Li Huafei wrote: >> When the call to gf100_grctx_generate() fails, unlock gr->fecs.mutex

Re: [PATCH v2] drm/amdgpu: Fix possible NULL pointer dereference

2024-10-29 Thread Li Huafei
On 2024/10/29 16:18, Christophe JAILLET wrote: > Le 29/10/2024 à 11:18, Li Huafei a écrit : >> Fix the potential NULL pointer dereference on mem_ranges in >> amdgpu_discovery_get_nps_info(). Additionally, assign the output >> parameters nps_type and range_cnt after t

[PATCH v3] drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()

2024-10-29 Thread Li Huafei
, assign the output parameters nps_type and range_cnt after the kvcalloc() call to prevent modifying the output parameters in case of an error return. Fixes: b194d21b9bcc ("drm/amdgpu: Use NPS ranges from discovery table") Suggested-by: Christophe JAILLET Reviewed-by: Lijo Lazar Signed-

[PATCH v2] drm/amdgpu: Fix possible NULL pointer dereference

2024-10-28 Thread Li Huafei
e NPS ranges from discovery table") Signed-off-by: Li Huafei --- Changes in v2: - kvzalloc() call uses 'nps_info->v1.count' instead of '*range_cnt' --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff -

Re: [PATCH] drm/amdgpu: Fix possible NULL pointer dereference

2024-10-28 Thread Li Huafei
On 2024/10/28 22:33, Lazar, Lijo wrote: > > > On 10/29/2024 3:29 AM, Li Huafei wrote: >> Fix the potential NULL pointer dereference on mem_ranges in >> amdgpu_discovery_get_nps_info(). Additionally, assign the output >> parameters nps_type and range_cnt after the

[PATCH] drm/amdgpu: Fix possible NULL pointer dereference

2024-10-28 Thread Li Huafei
e NPS ranges from discovery table") Signed-off-by: Li Huafei --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c index 4b

[PATCH] drm/nouveau/gr/gf100: Fix missing unlock in gf100_gr_chan_new()

2024-10-26 Thread Li Huafei
uveau/gr/gf100-: generate golden context during first object alloc") Signed-off-by: Li Huafei --- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c in