From: Alexandre Belloni <alexandre.belloni@bootlin.com> To: "Clément Léger" <clement.leger@bootlin.com> Cc: Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Nicolas Ferre <nicolas.ferre@microchip.com>, Ludovic Desroches <ludovic.desroches@microchip.com>, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: at91: fix count of periph clocks passed to pmc_data_allocate Date: Wed, 9 Jun 2021 10:31:01 +0200 [thread overview] Message-ID: <YMB8RYhCY4WVQXg+@piout.net> (raw) In-Reply-To: <20210609080145.44226-1-clement.leger@bootlin.com> hi, Subject should have been: clk: at91: sama5d2: fix count of periph clocks passed to pmc_data_allocate On 09/06/2021 10:01:44+0200, Clément Léger wrote: > When allocating clk_hw structure, only the periph32 clocks are considered. > Since sama5d2_periphck are also added to the phws there is currently an > out of bound write. Fix this by adding the count of periphck to periph32ck. > > Signed-off-by: Clément Léger <clement.leger@bootlin.com> Fixes: a2038077de9a ("clk: at91: add sama5d2 PMC driver") > --- > drivers/clk/at91/sama5d2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c > index 3d1f78176c3e..663b73a032ee 100644 > --- a/drivers/clk/at91/sama5d2.c > +++ b/drivers/clk/at91/sama5d2.c > @@ -170,7 +170,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np) > > sama5d2_pmc = pmc_data_allocate(PMC_AUDIOPLLCK + 1, > nck(sama5d2_systemck), > - nck(sama5d2_periph32ck), > + nck(sama5d2_periphck) + nck(sama5d2_periph32ck), > nck(sama5d2_gck), 3); > if (!sama5d2_pmc) > return; > -- > 2.32.0 > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com> To: "Clément Léger" <clement.leger@bootlin.com> Cc: Stephen Boyd <sboyd@kernel.org>, Michael Turquette <mturquette@baylibre.com>, linux-kernel@vger.kernel.org, Ludovic Desroches <ludovic.desroches@microchip.com>, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] clk: at91: fix count of periph clocks passed to pmc_data_allocate Date: Wed, 9 Jun 2021 10:31:01 +0200 [thread overview] Message-ID: <YMB8RYhCY4WVQXg+@piout.net> (raw) In-Reply-To: <20210609080145.44226-1-clement.leger@bootlin.com> hi, Subject should have been: clk: at91: sama5d2: fix count of periph clocks passed to pmc_data_allocate On 09/06/2021 10:01:44+0200, Clément Léger wrote: > When allocating clk_hw structure, only the periph32 clocks are considered. > Since sama5d2_periphck are also added to the phws there is currently an > out of bound write. Fix this by adding the count of periphck to periph32ck. > > Signed-off-by: Clément Léger <clement.leger@bootlin.com> Fixes: a2038077de9a ("clk: at91: add sama5d2 PMC driver") > --- > drivers/clk/at91/sama5d2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c > index 3d1f78176c3e..663b73a032ee 100644 > --- a/drivers/clk/at91/sama5d2.c > +++ b/drivers/clk/at91/sama5d2.c > @@ -170,7 +170,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np) > > sama5d2_pmc = pmc_data_allocate(PMC_AUDIOPLLCK + 1, > nck(sama5d2_systemck), > - nck(sama5d2_periph32ck), > + nck(sama5d2_periphck) + nck(sama5d2_periph32ck), > nck(sama5d2_gck), 3); > if (!sama5d2_pmc) > return; > -- > 2.32.0 > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-06-09 8:31 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-09 8:01 [PATCH] clk: at91: fix count of periph clocks passed to pmc_data_allocate Clément Léger 2021-06-09 8:01 ` Clément Léger 2021-06-09 8:31 ` Alexandre Belloni [this message] 2021-06-09 8:31 ` Alexandre Belloni 2021-07-08 14:13 ` Clément Léger 2021-07-08 14:13 ` Clément Léger
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=YMB8RYhCY4WVQXg+@piout.net \ --to=alexandre.belloni@bootlin.com \ --cc=clement.leger@bootlin.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-clk@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=ludovic.desroches@microchip.com \ --cc=mturquette@baylibre.com \ --cc=nicolas.ferre@microchip.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: linkBe 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.