| From 3f2b9733264d99c6050ee05ca4a31f1d201f27dc Mon Sep 17 00:00:00 2001 |
| From: Felix Kuehling <Felix.Kuehling@amd.com> |
| Date: Thu, 19 Dec 2019 22:36:55 -0500 |
| Subject: [PATCH] drm/amdkfd: Fix permissions of hang_hws |
| |
| commit 2bdac179e217a0c0b548a8c60524977586621b19 upstream. |
| |
| 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> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c b/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c |
| index ab37d36d9cd6..dcc01de77926 100644 |
| --- a/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c |
| +++ b/drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c |
| @@ -109,7 +109,7 @@ void kfd_debugfs_init(void) |
| kfd_debugfs_rls_by_device, |
| &kfd_debugfs_fops); |
| |
| - ent = debugfs_create_file("hang_hws", S_IFREG | 0644, debugfs_root, |
| + ent = debugfs_create_file("hang_hws", S_IFREG | 0200, debugfs_root, |
| NULL, |
| &kfd_debugfs_hang_hws_fops); |
| |
| -- |
| 2.7.4 |
| |