Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754171AbbGBQ4Z (ORCPT ); Thu, 2 Jul 2015 12:56:25 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:38983 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753653AbbGBQzz (ORCPT ); Thu, 2 Jul 2015 12:55:55 -0400 Date: Thu, 2 Jul 2015 09:55:53 -0700 From: Stephen Boyd To: Daniel Thompson Cc: Mike Turquette , Maxime Coquelin , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org Subject: Re: [PATCH] clk: stm32: Fix out-by-one error path in the index lookup Message-ID: <20150702165553.GC7201@codeaurora.org> References: <1435485332-14951-1-git-send-email-daniel.thompson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435485332-14951-1-git-send-email-daniel.thompson@linaro.org> 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: 881 Lines: 23 On 06/28, Daniel Thompson wrote: > 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 > Signed-off-by: Daniel Thompson > --- Applied to clk-fixes -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/