Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp3335010rdb; Thu, 7 Sep 2023 11:22:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvHUq52NdEdP5ZMKm3vZNCGL8bMuNaPCDZOyslZ3AUakMOAvmHCCoxXglS/xqieXI1dKHn X-Received: by 2002:a05:6870:b01f:b0:1c8:c37d:5e65 with SMTP id y31-20020a056870b01f00b001c8c37d5e65mr476366oae.11.1694110940531; Thu, 07 Sep 2023 11:22:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694110940; cv=none; d=google.com; s=arc-20160816; b=pAymRPIyXiqEQhYBQrbqIbuVEJL+s1TLwDvlclQPn1/5f+PhDPaN29+DjnzbmEDxPi N+UUWZFmkd6eOc2gqMeQdSKNkG6uNHJoys1ATGrWvSKTGkmsVYe8DJrfZOXPtrsXuRBs KOtAom14U0hpxhN0qa3EVIa4Q6F4hRMFi279nhsaW0m5WZ/5eJI0m1npzFtfrHihbzz5 ZmqqHMiUT35nqdoqiOwY3rwjy5/d2pZVn2w8XM3VDwNh8qwDVyHwkBnx3VpL6yxbDSvs H85evPnkUbCxmglPNTZf+/1YBNO+50xPCLded6BDnz8C3+I5/c0cgz3I3Nf4aVIR0eW3 ROfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=A5IgvmXN4JXBKS+k6j3CjQ0p/jLVGfVBw4RgaRWBtPQ=; fh=QFh02TH+NeiDU910FreQqnmtAw5315t0KD+z0VLDPJE=; b=Xy+hi+THL6I2oreE7HlI9GpMJwQ5z6iCS0OUnnbIL6vH/LS0UIq7jhRq98CefvphxC SjHMmm2vJ1z7VpudIG36cjV4Bv4g5jNsUDO4YPvWd2qOSx90C6QUXrcvMm8JyWbpvSyx I4qnl8ZIm6ZsETy4hc3GQcXxJwLPsDM3f6LQSKvccL3Uy14qSHsvbUNCyrRKHyzT3YtN Vj/6/MoEnTfhmtI0KaaDZl2KW28Wwm0koASBlOw6xZNOUDSFZpHpB6g2ic1sTJOtpWzV aD8xYueUsBTLO7d1eILqkvfhLk9kEMxZXRZzy25t3AsBfwVJJYyFvnrco4QuJepg+1Nw 2xNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rJ9eA+LQ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x64-20020a638643000000b00564c1d10dbdsi13352172pgd.132.2023.09.07.11.22.11; Thu, 07 Sep 2023 11:22:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rJ9eA+LQ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237231AbjIGQ0S (ORCPT + 53 others); Thu, 7 Sep 2023 12:26:18 -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) X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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