In function amd_acquire(), kfd_get_process() is call to get process. When judge whether we get an exception pointer, we shouldn't judge whether it's a null pointer, because kfd_get_process will return ERR_PTR(-EINVAL) if error.
Because of this wrong logic, the kernel will panic then once kfd_get_process returns ERR_PTR(-EINVAL).
So, the correct logic should be:
if (IS_ERR(p)) {
Operating System
Not relevant
CPU
Not relevant
GPU
Not relevant
ROCm Version
ROCm 6.2.3
ROCm Component
ROCK-Kernel-Driver
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
Problem Description
In function amd_acquire(), kfd_get_process() is call to get process. When judge whether we get an exception pointer, we shouldn't judge whether it's a null pointer, because kfd_get_process will return ERR_PTR(-EINVAL) if error. Because of this wrong logic, the kernel will panic then once kfd_get_process returns ERR_PTR(-EINVAL).
So, the correct logic should be: if (IS_ERR(p)) {
Operating System
Not relevant
CPU
Not relevant
GPU
Not relevant
ROCm Version
ROCm 6.2.3
ROCm Component
ROCK-Kernel-Driver
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
No response