[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <161827982902.3764895.8459589544672421029@swboyd.mtv.corp.google.com>
Date: Mon, 12 Apr 2021 19:10:29 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Colin King <colin.king@...onical.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michael Turquette <mturquette@...libre.com>,
linux-arm-kernel@...ts.infradead.org, linux-clk@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][V2] clk: uniphier: Fix potential infinite loop
Quoting Colin King (2021-04-09 02:01:04)
> From: Colin Ian King <colin.king@...onical.com>
>
> The for-loop iterates with a u8 loop counter i and compares this
> with the loop upper limit of num_parents that is an int type.
> There is a potential infinite loop if num_parents is larger than
> the u8 loop counter. Fix this by making the loop counter the same
> type as num_parents. Also make num_parents an unsigned int to
> match the return type of the call to clk_hw_get_num_parents.
>
> Addresses-Coverity: ("Infinite loop")
> Fixes: 734d82f4a678 ("clk: uniphier: add core support code for UniPhier clock driver")
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
Applied to clk-next
Powered by blists - more mailing lists