Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1504312

Re: [PATCH] clk: uniphier: fix memory overrun bug

From Stephen Boyd <sboyd@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH] clk: uniphier: fix memory overrun bug
Date 2016-10-19 22:20 +0200
Message-ID <su5vb-6ae-1@gated-at.bofh.it> (permalink)
References <su24j-3OH-51@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 10/19, Masahiro Yamada wrote:
> The first loop of this "for" statement writes memory beyond the
> allocated clk_hw_onecell_data.
> 
> It should be:
>     for (clk_num--; clk_num >= 0; clk_num--)
>             ...
> 
> Or more simply:
>     while (--clk_num >= 0)
>             ...
> 
> Fixes: 734d82f4a678 ("clk: uniphier: add core support code for UniPhier clock driver")
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Applied to clk-fixes

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] clk: uniphier: fix memory overrun bug Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-10-19 18:40 +0200
  Re: [PATCH] clk: uniphier: fix memory overrun bug Stephen Boyd <sboyd@codeaurora.org> - 2016-10-19 22:20 +0200

csiph-web