Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Frank.C" <tom.and.jerry.official.mail@gmail.com>
Cc: stable@vger.kernel.org, srinivasan.shanmugam@amd.com,
	chiahsuan.chung@amd.com, Rodrigo.Siqueira@amd.com,
	roman.li@amd.com, alex.hung@amd.com, aurabindo.pillai@amd.com,
	harry.wentland@amd.com, hamza.mahfooz@amd.com
Subject: Re: [PATCH 6.1.y/6.6.y] drm/amd/display: Add null check for head_pipe in dcn32_acquire_idle_pipe_for_head_pipe_in_layer
Date: Thu, 16 Jan 2025 11:15:45 +0100	[thread overview]
Message-ID: <2025011632-swivel-obtain-67e1@gregkh> (raw)
In-Reply-To: <20250116061726.56117-1-tom.and.jerry.official.mail@gmail.com>

On Thu, Jan 16, 2025 at 02:17:26PM +0800, Frank.C wrote:
> From: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
> 
> [ Upstream commit ac2140449184a26eac99585b7f69814bd3ba8f2d ]
> 
> This commit addresses a potential null pointer dereference issue in the
> `dcn32_acquire_idle_pipe_for_head_pipe_in_layer` function. The issue
> could occur when `head_pipe` is null.
> 
> The fix adds a check to ensure `head_pipe` is not null before asserting
> it. If `head_pipe` is null, the function returns NULL to prevent a
> potential null pointer dereference.
> 
> Reported by smatch:
> drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn32/dcn32_resource.c:2690 dcn32_acquire_idle_pipe_for_head_pipe_in_layer() error: we previously assumed 'head_pipe' could be null (see line 2681)
> 
> Cc: Tom Chung <chiahsuan.chung@amd.com>
> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
> Cc: Roman Li <roman.li@amd.com>
> Cc: Alex Hung <alex.hung@amd.com>
> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Hamza Mahfooz <hamza.mahfooz@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
> Reviewed-by: Tom Chung <chiahsuan.chung@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Frank.C <tom.and.jerry.official.mail@gmail.com>

I need a real name here, sorry.

greg k-h

      reply	other threads:[~2025-01-16 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16  6:17 [PATCH 6.1.y/6.6.y] drm/amd/display: Add null check for head_pipe in dcn32_acquire_idle_pipe_for_head_pipe_in_layer Frank.C
2025-01-16 10:15 ` Greg KH [this message]

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=2025011632-swivel-obtain-67e1@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=alex.hung@amd.com \
    --cc=aurabindo.pillai@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=hamza.mahfooz@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=roman.li@amd.com \
    --cc=srinivasan.shanmugam@amd.com \
    --cc=stable@vger.kernel.org \
    --cc=tom.and.jerry.official.mail@gmail.com \
    /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