Skip to content

Commit 910735d

Browse files
amd-yahuilgregkh
authored andcommitted
drm/amdkfd: Destroy KFD debugfs after destroy KFD wq
commit 2e58401 upstream. 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 <Amber.Lin@amd.com> Reviewed-by: Eric Huang <jinhuieric.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 0333052) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 382928b commit 910735d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)