ROCm / ROCK-Kernel-Driver

AMDGPU Driver with KFD used by the ROCm project. Also contains the current Linux Kernel that matches this base driver
Other
333 stars 101 forks source link

[Issue]: Incorrect exception handling logic in function amd_acquire() #175

Open zxpdemonio opened 1 month ago

zxpdemonio commented 1 month ago

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).

截屏2024-10-30 23 00 25 1

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