mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: "Ma Ke" <make24@iscas.ac.cn>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"David Airlie" <airlied@gmail.com>,
	"Dillon Varone" <dillon.varone@amd.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Jun Lei" <jun.lei@amd.com>, "Leo Li" <sunpeng.li@amd.com>,
	"Nicholas Kazlauskas" <Nicholas.Kazlauskas@amd.com>,
	"Qingqing Zhuo" <qingqing.zhuo@amd.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	"Stylon Wang" <stylon.wang@amd.com>,
	"Wayne Lin" <Wayne.Lin@amd.com>,
	"Xinhui Pan" <Xinhui.Pan@amd.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/amd/display: Add null check before access structs
Date: Wed, 26 Jun 2024 18:25:53 +0200	[thread overview]
Message-ID: <a8470f92-8059-46b3-b50d-5ed776d5b087@web.de> (raw)
In-Reply-To: <20240626130650.2866706-1-make24@iscas.ac.cn>

> In enable_phantom_plane, we should better check null pointer before
> accessing various structs.

1. Can a wording approach (like the following) be a better change description?
   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc5#n45

   A null pointer is stored in the local variable “phantom_plane” after a call
   of the function “create_phantom_plane” (as a data structure menber) failed.
   This pointer was used in subsequent statements where an undesirable
   dereference will be performed then.
   Thus add a corresponding return value check.


2. How do you think about to use a summary phrase like
   “Prevent null pointer dereference in enable_phantom_plane()”?

Regards,
Markus

  reply	other threads:[~2024-06-26 16:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 13:06 Ma Ke
2024-06-26 16:25 ` Markus Elfring [this message]
2024-06-26 17:57 ` Aurabindo Pillai
2024-06-26 19:00   ` Markus Elfring

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=a8470f92-8059-46b3-b50d-5ed776d5b087@web.de \
    --to=markus.elfring@web.de \
    --cc=Nicholas.Kazlauskas@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Wayne.Lin@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dillon.varone@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=jun.lei@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=make24@iscas.ac.cn \
    --cc=qingqing.zhuo@amd.com \
    --cc=stylon.wang@amd.com \
    --cc=sunpeng.li@amd.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

all inboxes | Powered by JetHome®