drm/amdkfd: Uninitialized pointer read
Subsystems (3)
PATCH 1/1 drm/amdkfd: Uninitialized pointer read
This a pointer that is being passed into other functions, so it is best to initialize it to NULL prior.
Signed-off-by Andrew Martin <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +1 -1
@@ -1777,7 +1777,7 @@ static void kfd_fill_cache_non_crat_info(struct kfd_topology_device *dev, structstruct amdgpu_cu_info *cu_info = &kdev->adev->gfx.cu_info;struct amdgpu_gfx_config *gfx_info = &kdev->adev->gfx.config;int gpu_processor_id; -struct kfd_cache_properties *props_ext; +struct kfd_cache_properties *props_ext =NULL ;int num_of_entries =0 ;int num_of_cache_types =0 ;struct kfd_gpu_cache_info cache_info[KFD_MAX_CACHE_TYPES ];
Signature · 1 line
2.43.0
[Public]
Reviewed-by Harish Kasiviswanathan <[email protected]>
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Andrew Martin
Sent: Friday, December 6, 2024 3:07 PM
To: [email protected]
Cc: Kuehling, Felix <[email protected]>; Tudor, Alexandru <[email protected]>; Martin, Andrew <[email protected]>; Martin, Andrew <[email protected]>
Subject: [PATCH] drm/amdkfd: Uninitialized pointer read
This a pointer that is being passed into other functions, so it is best to initialize it to NULL prior.
Signed-off-by Andrew Martin <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +1 -1
@@ -1777,7 +1777,7 @@ static void kfd_fill_cache_non_crat_info(struct kfd_topology_device *dev, structstruct amdgpu_cu_info *cu_info = &kdev->adev->gfx.cu_info;struct amdgpu_gfx_config *gfx_info = &kdev->adev->gfx.config;int gpu_processor_id; -struct kfd_cache_properties *props_ext; +struct kfd_cache_properties *props_ext =NULL ;int num_of_entries =0 ;int num_of_cache_types =0 ;struct kfd_gpu_cache_info cache_info[KFD_MAX_CACHE_TYPES ];
--
2.43.0