]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/amdkfd: Fix permissions of hang_hws
authorFelix Kuehling <Felix.Kuehling@amd.com>
Fri, 20 Dec 2019 03:36:55 +0000 (22:36 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Jan 2020 16:54:30 +0000 (11:54 -0500)
Reading from /sys/kernel/debug/kfd/hang_hws would cause a kernel
oops because we didn't implement a read callback. Set the permission
to write-only to prevent that.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: shaoyunl <shaoyun.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c

index 15c523027285cefb519f70085552009724abc5ad..511712c2e382dd3cb5fc95445d8a848190af6fcd 100644 (file)
@@ -93,7 +93,7 @@ void kfd_debugfs_init(void)
                            kfd_debugfs_hqds_by_device, &kfd_debugfs_fops);
        debugfs_create_file("rls", S_IFREG | 0444, debugfs_root,
                            kfd_debugfs_rls_by_device, &kfd_debugfs_fops);
-       debugfs_create_file("hang_hws", S_IFREG | 0644, debugfs_root,
+       debugfs_create_file("hang_hws", S_IFREG | 0200, debugfs_root,
                            NULL, &kfd_debugfs_hang_hws_fops);
 }