From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Daniil Dulov <d.dulov@aladdin.ru>, Doug Berger <opendmb@gmail.com>
Cc: Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH] net: phy: mdio-bcm-unimac: Cast denominator to unsigned long to avoid overflow
Date: Thu, 7 Mar 2024 12:21:26 -0800 [thread overview]
Message-ID: <5592aeca-608f-4817-8848-99deb2815ddc@broadcom.com> (raw)
In-Reply-To: <20240307131947.13133-1-d.dulov@aladdin.ru>
[-- Attachment #1: Type: text/plain, Size: 575 bytes --]
On 3/7/2024 5:19 AM, Daniil Dulov wrote:
> The expression priv->clk_freq * 2 can lead to overflow that will cause
> a division by zero. So, let's cast it to unsigned long to avoid it.
It will not in real life because the maximum clock frequency is 250MHz,
but it also does not hurt.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: b78ac6ecd1b6 ("net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider")
> Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
next prev parent reply other threads:[~2024-03-07 20:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 13:19 Daniil Dulov
2024-03-07 20:21 ` Florian Fainelli [this message]
2024-03-09 3:52 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5592aeca-608f-4817-8848-99deb2815ddc@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=d.dulov@aladdin.ru \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lvc-project@linuxtesting.org \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®