From: Peter Shkenev Date: Thu, 17 Jul 2025 20:48:17 +0000 (+0300) Subject: drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities X-Git-Tag: v6.12.44~202 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=83cfdc2b018cd9c0f927b781d4e07c0d4a911fac;p=thirdparty%2Fkernel%2Fstable.git drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities commit b4a69f7f29c8a459ad6b4d8a8b72450f1d9fd288 upstream. HUBBUB structure is not initialized on DCE hardware, so check if it is NULL to avoid null dereference while accessing amdgpu_dm_capabilities file in debugfs. Signed-off-by: Peter Shkenev Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c index 15d94d2a0e2fb..97a9b37f78a24 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c @@ -3932,7 +3932,7 @@ static int capabilities_show(struct seq_file *m, void *unused) struct hubbub *hubbub = dc->res_pool->hubbub; - if (hubbub->funcs->get_mall_en) + if (hubbub && hubbub->funcs->get_mall_en) hubbub->funcs->get_mall_en(hubbub, &mall_in_use); if (dc->cap_funcs.get_subvp_en)