[PATCH master] ARM: i.MX7: esdctl: fix out-of-bounds read on memory size calculation

2022-05-12 Thread Ahmad Fatoum
addrmap[] has 9 elements on i.MX8M platforms and 7 elements on i.MX7. Checking unconditionally for addrmap[8] is thus out-of-bounds on the i.MX7. As this code was added for the i.MX8, skip it for i.MX7. Fixes: 42d45ef380c5 ("ARM: imx: Add imx8 support for SDRAM with two or more bank groups")

Re: [PATCH] clk: handle NULL args in clk_set_parent()

2022-05-12 Thread Sascha Hauer
On Wed, May 11, 2022 at 12:09:11PM +0200, Bastian Krause wrote: > NULL struct clk pointers should be treated just as the Linux kernel clk > driver does [1]. The reasoning should also apply to the parent clk > argument. > > A NULL struct clk pointer can happen for example on the Freescale i.MX6 >

Re: [PATCH] clk: handle NULL args in clk_set_parent()

2022-05-12 Thread Sascha Hauer
On Thu, May 12, 2022 at 10:54:37AM +0200, Bastian Krause wrote: > Hi Sascha, > > On 5/12/22 09:03, Sascha Hauer wrote: > > On Wed, May 11, 2022 at 12:09:11PM +0200, Bastian Krause wrote: > > > NULL struct clk pointers should be treated just as the Linux kernel clk > > > driver does [1]. The

Re: [PATCH] clk: handle NULL args in clk_set_parent()

2022-05-12 Thread Bastian Krause
Hi Sascha, On 5/12/22 09:03, Sascha Hauer wrote: On Wed, May 11, 2022 at 12:09:11PM +0200, Bastian Krause wrote: NULL struct clk pointers should be treated just as the Linux kernel clk driver does [1]. The reasoning should also apply to the parent clk argument. A NULL struct clk pointer can