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>
---
drivers/clk/at91/sama5d2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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>
Hi,
Le Wed, 9 Jun 2021 10:31:01 +0200,
Alexandre Belloni [off-list ref] a écrit :
hi,
Subject should have been:
clk: at91: sama5d2: fix count of periph clocks passed to
pmc_data_allocate
This patch can actually be discarded since it won't fix allocation at
all but will just allocate more data than needed since nck already
returns the max .id field of the periph array.
On 09/06/2021 10:01:44+0200, Clément Léger wrote:
quoted
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>