[PATCH] drm/amdkfd: Fix NULL Pointer Dereference in KFD queue

2025-02-28 Thread Andrew Martin
Through KFD IOCTL Fuzzing we encountered a NULL pointer derefrence when calling kfd_queue_acquire_buffers. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c

[PATCH v3] drm/amdkfd: Uninitialized and Unused variables

2025-01-08 Thread Andrew Martin
This patch initialized key variables and removed unused ones. Signed-off-by: Andrew Martin --- .../gpu/drm/amd/amdkfd/cik_event_interrupt.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 24 +-- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 +- .../drm/amd/amdkfd

[PATCH v4] drm/amdkfd: Uninitialized and Unused variables

2025-01-03 Thread Andrew Martin
This patch initialized key variables and removed unused ones. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 8 ++-- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 +- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 38 --- .../gpu/drm/amd

[PATCH v4] drm/amdkfd: Various return code cleanup

2024-12-31 Thread Andrew Martin
This patch checks and handles the return code of various functions. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 7 --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_debug.c| 19 ++- .../drm

[PATCH v3] drm/amdkfd: Various return code cleanup

2024-12-30 Thread Andrew Martin
This patch checks and handles the return code of various functions. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_debug.c| 19 ++- .../drm/amd

[PATCH v2] drm/amdkfd: Ignored various return code

2024-12-30 Thread Andrew Martin
This patch checks and handles the return code of the called function. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_debug.c| 19 ++- .../drm

[PATCH] drm/amdkfd: Ignored various return code

2024-12-30 Thread Andrew Martin
This patch checks and handles the return code of the called function. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_debug.c| 19 ++- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 11 ++- 3

[PATCH 2/2] drm/amdkfd: Failed to check various return code

2024-12-10 Thread Andrew Martin
Clean up code to quiet the compiler on us failing to check the return code. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd

[PATCH 1/2] drm/amdgpu: Failed to check various return code

2024-12-10 Thread Andrew Martin
Clean up code to quiet the compiler on us failing to check the return code. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff

[PATCH] drm/amdkfd: Failed to check various return code

2024-12-06 Thread Andrew Martin
Clean up code to quiet the compiler on us failing to check the return code. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 14 +++--- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

[PATCH] drm/amdkfd: Uninitialized pointer read

2024-12-06 Thread Andrew Martin
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 --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b

[PATCH v2] drm/amdkfd: Dereference null return value

2024-12-02 Thread Andrew Martin
In the function pqm_uninit there is a call-assignment of "pdd = kfd_get_process_device_data" which could be null, and this value was later dereferenced without checking. Fixes: fb91065851cd ("drm/amdkfd: Refactor queue wptr_bo GART mapping") Signed-off-by: Andrew Martin ---

[PATCH] drm/amdkfd: Dereference null return value

2024-11-28 Thread Andrew Martin
In the function pqm_uninit there is a call-assignment of "pdd = kfd_get_process_device_data" which could be null, and this value was later dereferenced without checking. Signed-off-by: Andrew Martin --- .../drm/amd/amdkfd/kfd_process_queue_manager.c | 16 1 file c