From: Alex Deucher <alexdeucher@gmail.com>
To: Peter Shkenev <mustela@erminea.space>
Cc: alexander.deucher@amd.com, amd-gfx@lists.freedesktop.org,
christian.koenig@amd.com, airlied@gmail.com, simona@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities
Date: Fri, 18 Jul 2025 12:46:49 -0400 [thread overview]
Message-ID: <CADnq5_N++cfNqzaft003nJhqkyUbMQFYcM+ioM5yh_JNrnV5oA@mail.gmail.com> (raw)
In-Reply-To: <20250717204819.731936-1-mustela@erminea.space>
Applied. Thanks!
Alex
On Thu, Jul 17, 2025 at 4:58 PM Peter Shkenev <mustela@erminea.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@erminea.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
>
next prev parent reply other threads:[~2025-07-18 16:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 20:48 [PATCH] drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities Peter Shkenev
2025-07-18 16:46 ` Alex Deucher [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-07-17 20:54 Peter Shkenev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADnq5_N++cfNqzaft003nJhqkyUbMQFYcM+ioM5yh_JNrnV5oA@mail.gmail.com \
--to=alexdeucher@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mustela@erminea.space \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).