From: Stephen Boyd <sboyd@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Michael Turquette <mturquette@baylibre.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@bootlin.com>,
linux-clk@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] clk: mvebu: Off by one bugs in cp110_of_clk_get()
Date: Mon, 03 Dec 2018 17:55:16 +0000 [thread overview]
Message-ID: <154385971618.88331.15503515631878065127@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <20181203145055.4fvrmy3c4zyocgsx@kili.mountain>
Quoting Dan Carpenter (2018-12-03 06:50:55)
> These > comparisons should be >= to prevent reading beyond the end of
> of the clk_data->hws[] buffer.
>
> The clk_data->hws[] array is allocated in cp110_syscon_common_probe()
> when we do:
> cp110_clk_data = devm_kzalloc(dev, sizeof(*cp110_clk_data) +
> sizeof(struct clk_hw *) * CP110_CLK_NUM,
> GFP_KERNEL);
> As you can see, it has CP110_CLK_NUM elements which is equivalent to
> CP110_MAX_CORE_CLOCKS + CP110_MAX_GATABLE_CLOCKS.
>
> Fixes: d3da3eaef7f4 ("clk: mvebu: new driver for Armada CP110 system controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
Applied to clk-fixes
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Boyd <sboyd@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Michael Turquette <mturquette@baylibre.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@bootlin.com>,
linux-clk@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] clk: mvebu: Off by one bugs in cp110_of_clk_get()
Date: Mon, 03 Dec 2018 09:55:16 -0800 [thread overview]
Message-ID: <154385971618.88331.15503515631878065127@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <20181203145055.4fvrmy3c4zyocgsx@kili.mountain>
Quoting Dan Carpenter (2018-12-03 06:50:55)
> These > comparisons should be >= to prevent reading beyond the end of
> of the clk_data->hws[] buffer.
>
> The clk_data->hws[] array is allocated in cp110_syscon_common_probe()
> when we do:
> cp110_clk_data = devm_kzalloc(dev, sizeof(*cp110_clk_data) +
> sizeof(struct clk_hw *) * CP110_CLK_NUM,
> GFP_KERNEL);
> As you can see, it has CP110_CLK_NUM elements which is equivalent to
> CP110_MAX_CORE_CLOCKS + CP110_MAX_GATABLE_CLOCKS.
>
> Fixes: d3da3eaef7f4 ("clk: mvebu: new driver for Armada CP110 system controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
Applied to clk-fixes
next prev parent reply other threads:[~2018-12-03 17:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 14:50 [PATCH] clk: mvebu: Off by one bugs in cp110_of_clk_get() Dan Carpenter
2018-12-03 14:50 ` Dan Carpenter
2018-12-03 17:55 ` Stephen Boyd [this message]
2018-12-03 17:55 ` Stephen Boyd
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=154385971618.88331.15503515631878065127@swboyd.mtv.corp.google.com \
--to=sboyd@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=gregory.clement@bootlin.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=thomas.petazzoni@free-electrons.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.