Re: [PATCH] misc: vexpress: Off by one in vexpress_syscfg_exec()

From: Sudeep Holla
Date: Mon Dec 03 2018 - 11:29:03 EST


On Mon, Dec 03, 2018 at 05:52:19PM +0300, Dan Carpenter wrote:
> The > comparison should be >= to prevent reading beyond the end of the
> func->template[] array.
>
> (The func->template array is allocated in vexpress_syscfg_regmap_init()
> and it has func->num_templates elements.)
>
> Fixes: 974cc7b93441 ("mfd: vexpress: Define the device as MFD cells")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Good catch, thanks for identifying and fixing this.

Acked-by: Sudeep Holla <sudeep.holla@xxxxxxx>

I assume Greg will pick this up, if not I will add this when I send
pull request next time(not sure when yet as I don't have anything for
v4.21)

--
Regards,
Sudeep