[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_N++cfNqzaft003nJhqkyUbMQFYcM+ioM5yh_JNrnV5oA@mail.gmail.com>
Date: Fri, 18 Jul 2025 12:46:49 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Peter Shkenev <mustela@...inea.space>
Cc: alexander.deucher@....com, amd-gfx@...ts.freedesktop.org,
christian.koenig@....com, airlied@...il.com, simona@...ll.ch,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities
Applied. Thanks!
Alex
On Thu, Jul 17, 2025 at 4:58 PM Peter Shkenev <mustela@...inea.space> wrote:
>
> 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@...inea.space>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 c7d13e743e6c..b726bcd18e29 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
> @@ -3988,7 +3988,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)
> --
> 2.50.1
>
Powered by blists - more mailing lists