From: Markus Elfring <Markus.Elfring@web.de>
To: Henry Martin <bsdhenrymartin@gmail.com>,
linux-fbdev@vger.kernel.org, linux-arm-msm@vger.kernel.org,
dri-devel@lists.freedesktop.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Daniel Thompson <danielt@kernel.org>,
Helge Deller <deller@gmx.de>, Jingoo Han <jingoohan1@gmail.com>,
Lee Jones <lee@kernel.org>
Subject: Re: [PATCH v2] backlight: pm8941: Add NULL check in wled_configure()
Date: Mon, 31 Mar 2025 18:48:34 +0200 [thread overview]
Message-ID: <17c07117-36a6-4fab-aca8-a4cd3a67f2b0@web.de> (raw)
In-Reply-To: <20250331141654.12624-1-bsdhenrymartin@gmail.com>
> devm_kasprintf() return NULL if memory allocation fails. Currently,
call? failed?
> wled_configure() does not check for this case, leading to a possible NULL
> pointer dereference.
You may omit the word “possible” in such a change description.
(Would questionable data processing happen in other function implementations?)
> Add NULL check after devm_kasprintf() to prevent this issue.
Do you complete the error/exception handling also with the statement “return -ENOMEM;”?
Regards,
Markus
next prev parent reply other threads:[~2025-03-31 16:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 14:16 [PATCH v2] backlight: pm8941: Add NULL check in wled_configure() Henry Martin
2025-03-31 16:48 ` Markus Elfring [this message]
2025-03-31 20:23 ` Dmitry Baryshkov
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=17c07117-36a6-4fab-aca8-a4cd3a67f2b0@web.de \
--to=markus.elfring@web.de \
--cc=bsdhenrymartin@gmail.com \
--cc=danielt@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingoohan1@gmail.com \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@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