[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALszF6D7_MQ0V=-RNsbFWYw22fXbcE+dFTOH3F9Tu4cCJ_Dwsw@mail.gmail.com>
Date: Mon, 29 Jun 2015 10:50:47 +0200
From: Maxime Coquelin <mcoquelin.stm32@...il.com>
To: Daniel Thompson <daniel.thompson@...aro.org>
Cc: Mike Turquette <mturquette@...aro.org>,
Stephen Boyd <sboyd@...eaurora.org>, linux-clk@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
patches@...aro.org, linaro-kernel@...ts.linaro.org
Subject: Re: [PATCH] clk: stm32: Fix out-by-one error path in the index lookup
Hi Daniel,
2015-06-28 11:55 GMT+02:00 Daniel Thompson <daniel.thompson@...aro.org>:
> If stm32f4_rcc_lookup() is called with primary == 0 and secondary == 192
> then it will read beyond the end of the table array due to an out-by-one
> error in the range check.
>
> In addition to the fixing the inequality we also modify the r.h.s. to
> make it even more explicit that we are comparing against the size of
> table in bits.
>
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Daniel Thompson <daniel.thompson@...aro.org>
> ---
> drivers/clk/clk-stm32f4.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Thanks for the patch.
Acked-by: Maxime Coquelin <mcoquelin.stm32@...il.com>
Regards,
Maxime
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists