]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities
authorPeter Shkenev <mustela@erminea.space>
Thu, 17 Jul 2025 20:48:17 +0000 (23:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:31:02 +0000 (16:31 +0200)
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 <mustela@erminea.space>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c

index 15d94d2a0e2fb325e57331c998bf1f4fea4d41fa..97a9b37f78a245d5080646f1a5ed5a273cb657b0 100644 (file)
@@ -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)