public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: jianqi.ren.cn@windriver.com
Cc: n.zhandarovich@fintech.ru, stable@vger.kernel.org
Subject: Re: [PATCH 6.1.y] drm/amd/display: fix NULL checks for adev->dm.dc in amdgpu_dm_fini()
Date: Thu, 5 Dec 2024 09:40:49 +0100	[thread overview]
Message-ID: <2024120543-extrude-ranking-96ab@gregkh> (raw)
In-Reply-To: <20241205084329.1748881-1-jianqi.ren.cn@windriver.com>

On Thu, Dec 05, 2024 at 04:43:29PM +0800, jianqi.ren.cn@windriver.com wrote:
> From: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
> 
> Since 'adev->dm.dc' in amdgpu_dm_fini() might turn out to be NULL
> before the call to dc_enable_dmub_notifications(), check
> beforehand to ensure there will not be a possible NULL-ptr-deref
> there.
> 
> Also, since commit 1e88eb1b2c25 ("drm/amd/display: Drop
> CONFIG_DRM_AMD_DC_HDCP") there are two separate checks for NULL in
> 'adev->dm.dc' before dc_deinit_callbacks() and dc_dmub_srv_destroy().
> Clean up by combining them all under one 'if'.
> 
> Found by Linux Verification Center (linuxtesting.org) with static
> analysis tool SVACE.
> 
> Fixes: 81927e2808be ("drm/amd/display: Support for DMUB AUX")
> Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

No upstream git id :(

  reply	other threads:[~2024-12-05  8:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05  8:43 [PATCH 6.1.y] drm/amd/display: fix NULL checks for adev->dm.dc in amdgpu_dm_fini() jianqi.ren.cn
2024-12-05  8:40 ` Greg KH [this message]
2024-12-05 13:34 ` Sasha Levin
  -- strict thread matches above, loose matches on Subject: below --
2024-12-06  3:31 jianqi.ren.cn
2024-12-06 17:11 ` Sasha Levin
2024-12-11  8:14 ` Greg KH
2024-12-09  6:41 jianqi.ren.cn
2024-12-09 14:35 ` Sasha Levin
2024-12-11  9:56 jianqi.ren.cn
2024-12-11 16:33 ` Sasha Levin
2024-12-11 10:15 jianqi.ren.cn
2024-12-11 16:33 ` Sasha Levin
2025-01-26  6:44 Imkanmod Khan
2025-01-26 17:22 ` Sasha Levin

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=2024120543-extrude-ranking-96ab@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=jianqi.ren.cn@windriver.com \
    --cc=n.zhandarovich@fintech.ru \
    --cc=stable@vger.kernel.org \
    /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