Skip to content

Commit 2e58401

Browse files
amd-yahuilalexdeucher
authored andcommitted
drm/amdkfd: Destroy KFD debugfs after destroy KFD wq
Since KFD proc content was moved to kernel debugfs, we can't destroy KFD debugfs before kfd_process_destroy_wq. Move kfd_process_destroy_wq prior to kfd_debugfs_fini to fix a kernel NULL pointer problem. It happens when /sys/kernel/debug/kfd was already destroyed in kfd_debugfs_fini but kfd_process_destroy_wq calls kfd_debugfs_remove_process. This line debugfs_remove_recursive(entry->proc_dentry); tries to remove /sys/kernel/debug/kfd/proc/<pid> while /sys/kernel/debug/kfd is already gone. It hangs the kernel by kernel NULL pointer. Signed-off-by: Amber Lin <[email protected]> Reviewed-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 0333052) Cc: [email protected]
1 parent 9285873 commit 2e58401

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/amd/amdkfd/kfd_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ static int kfd_init(void)
7878
static void kfd_exit(void)
7979
{
8080
kfd_cleanup_processes();
81-
kfd_debugfs_fini();
8281
kfd_process_destroy_wq();
82+
kfd_debugfs_fini();
8383
kfd_procfs_shutdown();
8484
kfd_topology_shutdown();
8585
kfd_chardev_exit();

0 commit comments

Comments
 (0)