Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942823AbcJSUO0 (ORCPT ); Wed, 19 Oct 2016 16:14:26 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42643 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750922AbcJSUOY (ORCPT ); Wed, 19 Oct 2016 16:14:24 -0400 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org C8A95617FF Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=sboyd@codeaurora.org Date: Wed, 19 Oct 2016 13:14:21 -0700 From: Stephen Boyd To: Masahiro Yamada Cc: linux-clk@vger.kernel.org, Michael Turquette , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] clk: uniphier: fix memory overrun bug Message-ID: <20161019201421.GY8871@codeaurora.org> References: <1476877779-27854-1-git-send-email-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476877779-27854-1-git-send-email-yamada.masahiro@socionext.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 582 Lines: 21 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 > --- Applied to clk-fixes -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project