From: Luca Ceresoli <luca@lucaceresoli.net>
To: Adam Ford <aford173@gmail.com>, linux-clk@vger.kernel.org
Cc: dan.carpenter@oracle.com, aford@beaconembedded.com,
charles.stevens@logicpd.com, Marek Vasut <marek.vasut@gmail.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] clk: vc5: Add memory check to prevent oops
Date: Tue, 7 Jul 2020 23:34:42 +0200 [thread overview]
Message-ID: <128e24e8-ae83-0b0f-8771-28a67f6d8586@lucaceresoli.net> (raw)
In-Reply-To: <20200706203727.18380-1-aford173@gmail.com>
Hi Adam,
On 06/07/20 22:37, Adam Ford wrote:
> When getting the names of the child nodes, kasprintf is used to
> allocate memory which is used to create the string for the node
> name. Unfortunately, there is no memory check to determine
> if this allocation fails, it may cause an error when trying
> to get child node name.
>
> This patch will check if the memory allocation fails, and returns
> and -NOMEM error instead of blindly moving on.
s/-NOMEM/-ENOMEM/
With this possibly fixed:
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
--
Luca
prev parent reply other threads:[~2020-07-07 21:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 20:37 Adam Ford
2020-07-07 21:34 ` Luca Ceresoli [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=128e24e8-ae83-0b0f-8771-28a67f6d8586@lucaceresoli.net \
--to=luca@lucaceresoli.net \
--cc=aford173@gmail.com \
--cc=aford@beaconembedded.com \
--cc=charles.stevens@logicpd.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.vasut@gmail.com \
--cc=mturquette@baylibre.com \
--cc=sboyd@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
all inboxes | Powered by JetHome®