From a86e0213dd30eb4cbaf827cbabdd8415c1ae8f51 Mon Sep 17 00:00:00 2001 From: Philip Yang Date: Thu, 10 Jul 2025 18:36:32 +0800 Subject: [PATCH] drm/amdkfd: debugfs hang_hws skip GPU with MES stable inclusion from stable-v6.6.88 commit a36f8d544522a19ef06ed9e84667d154dcb6be52 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IC6M30 CVE: CVE-2025-37853 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a36f8d544522a19ef06ed9e84667d154dcb6be52 -------------------------------- [ Upstream commit fe9d0061c413f8fb8c529b18b592b04170850ded ] debugfs hang_hws is used by GPU reset test with HWS, for MES this crash the kernel with NULL pointer access because dqm->packet_mgr is not setup for MES path. Skip GPU with MES for now, MES hang_hws debugfs interface will be supported later. Signed-off-by: Philip Yang Reviewed-by: Kent Russell Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin Signed-off-by: Wang Hai Signed-off-by: Guo Mengqi --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index 9d0b0bf70ad1..2786d47961e0 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c @@ -1388,6 +1388,11 @@ int kfd_debugfs_hang_hws(struct kfd_node *dev) return -EINVAL; } + if (dev->kfd->shared_resources.enable_mes) { + dev_err(dev->adev->dev, "Inducing MES hang is not supported\n"); + return -EINVAL; + } + return dqm_debugfs_hang_hws(dev->dqm); } -- Gitee