From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32BF5EC873D for ; Thu, 7 Sep 2023 16:26:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240939AbjIGQ0b (ORCPT ); Thu, 7 Sep 2023 12:26:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238949AbjIGQ0J (ORCPT ); Thu, 7 Sep 2023 12:26:09 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D41DF6A74; Thu, 7 Sep 2023 09:22:19 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A618C433CB; Thu, 7 Sep 2023 06:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694066417; bh=k6m1FrHgokNhY1DM/EuEPwGTEKfRg8usrhPLJuc9oiY=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=rJ9eA+LQqXNJL/vMKBoi1qHHT7dufrHijo19qqi6yEa7+C7YYpL/huaJ3k7rW2pvr 3xdzybrxI0sXHNXn2P+qTjfe/r66AD0BMF6utFe8qrrLBvdo9eOZhulT1Qwl6NWfRE gJQPd0QZXY80BVgHXN9Eb/eCc+wDdxNF4LBv33Goviyp/JiDBp6QgDUmWes3iv9Q02 UVwor99VEG4S64jFyz48PxuFiGJigaFIyhI238CJc1yWQvL+0hVNkFKTguMusTRf1H slk6NZJc8JE+KRQ8Te792ig4masRNmknJhXKhuv4Z4c/UsCRo4Js/qZIPwKT8pnID/ eJ8cAsAt1v/vg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH v2] ssb: Fix division by zero issue in ssb_calc_clock_rate From: Kalle Valo In-Reply-To: <20230904232346.34991-1-rand.sec96@gmail.com> References: <20230904232346.34991-1-rand.sec96@gmail.com> To: Rand Deeb Cc: Michael Buesch , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, deeb.rand@confident.ru, lvc-project@linuxtesting.org, voskresenski.stanislav@confident.ru, Rand Deeb User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169406641403.3946078.14931132240535951245.kvalo@kernel.org> Date: Thu, 7 Sep 2023 06:00:15 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rand Deeb wrote: > In ssb_calc_clock_rate(), there is a potential issue where the value of > m1 could be zero due to initialization using clkfactor_f6_resolv(). This > situation raised concerns about the possibility of a division by zero > error. > > We fixed it by following the suggestions provided by Larry Finger > and Michael Büsch . The fix > involves returning a value of 1 instead of 0 in clkfactor_f6_resolv(). > This modification ensures the proper functioning of the code and > eliminates the risk of division by zero errors. > > Signed-off-by: Rand Deeb > Acked-by: Larry Finger > Acked-by: Michael Büsch Patch applied to wireless-next.git, thanks. e0b5127fa134 ssb: Fix division by zero issue in ssb_calc_clock_rate -- https://patchwork.kernel.org/project/linux-wireless/patch/20230904232346.34991-1-rand.sec96@gmail.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches