From: Markus Elfring <Markus.Elfring@web.de>
To: Ma Ke <make24@iscas.ac.cn>,
dri-devel@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>,
Dave Airlie <airlied@redhat.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Patrik Jakobsson <patrik.r.jakobsson@gmail.com>,
Thomas Zimmermann <tzimmermann@suse.de>
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
David Airlie <airlied@gmail.com>
Subject: Re: [PATCH v2] drm/gma500: fix null pointer dereference in cdv_intel_lvds_get_modes
Date: Thu, 27 Jun 2024 13:33:40 +0200 [thread overview]
Message-ID: <eb14ae3b-7a4f-4802-b9a7-9ffec3b951f9@web.de> (raw)
In-Reply-To: <20240627063220.3013568-1-make24@iscas.ac.cn>
> In cdv_intel_lvds_get_modes(), the return value of drm_mode_duplicate()
> is assigned to mode, which will lead to a NULL pointer dereference on
> failure of drm_mode_duplicate(). Add a check to avoid npd.
A) Can a wording approach (like the following) be a better change description?
A null pointer is stored in the local variable “mode” after a call
of the function “drm_mode_duplicate” failed. This pointer was passed to
a subsequent call of the function “drm_mode_probed_add” where an undesirable
dereference will be performed then.
Thus add a corresponding return value check.
B) Would you like to append parentheses to the function name
in the summary phrase?
C) How do you think about to put similar results from static source code
analyses into corresponding patch series?
Regards,
Markus
next prev parent reply other threads:[~2024-06-27 11:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 6:32 Ma Ke
2024-06-27 11:33 ` Markus Elfring [this message]
2024-06-27 11:44 ` Greg KH
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=eb14ae3b-7a4f-4802-b9a7-9ffec3b951f9@web.de \
--to=markus.elfring@web.de \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=make24@iscas.ac.cn \
--cc=mripard@kernel.org \
--cc=patrik.r.jakobsson@gmail.com \
--cc=stable@vger.kernel.org \
--cc=tzimmermann@suse.de \
/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
Powered by JetHome