[PATCH] drm/xe: skip register UC debugfs if UC disabled
Ohad Sharabi
osharabi at habana.ai
Thu Jan 4 10:05:57 UTC 2024
When working with execlist we should not register the UC debugfs entries.
Accessing those entries when UC is disabled can lead to a kernel crush
(NULL pointer dereference).
Signed-off-by: Ohad Sharabi <osharabi at habana.ai>
---
drivers/gpu/drm/xe/xe_gt_debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c
index c4b67cf09f8f..bafd55a7fb16 100644
--- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
@@ -245,5 +245,6 @@ void xe_gt_debugfs_register(struct xe_gt *gt)
ARRAY_SIZE(debugfs_list),
root, minor);
- xe_uc_debugfs_register(>->uc, root);
+ if (xe_device_uc_enabled(xe))
+ xe_uc_debugfs_register(>->uc, root);
}
--
2.34.1
More information about the Intel-xe
mailing list