From: Viresh Kumar <viresh.kumar@linaro.org>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@kernel.org>,
Rob Herring <rob.herring@calxeda.com>,
Shawn Guo <shawn.guo@linaro.org>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org, Eli Gurvitz <egurvitz@nvidia.com>
Subject: Re: [PATCH] OPP: of: Fix potential multiplication overflow when calculating freq
Date: Mon, 31 Aug 2026 11:34:50 +0530 [thread overview]
Message-ID: <apUZgrCjLxN-T031@vireshk-B250M-D3H> (raw)
In-Reply-To: <20260826131957.1063765-1-colin.i.king@gmail.com>
On 26-08-26, 14:19, Colin Ian King wrote:
> The multiplication be32_to_cpup(val++) * 1000 is performed using 32 bit
> unsigned integers and hence uses a 32 bit multiplication; this will
> overflow if be32_to_cpup(val++) is greater than 4294967 (which is
> very unlikely at present). The result is assigned to an unsigned long
> (which is a 64 bit value on 64 bit systems), so fix this potential
> overflow by casting the first operand of the multiplication to
> an unsigned int.
>
> Fixes: b496dfbc94ab ("PM / OPP: Initialize OPP table from device tree")
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/opp/of.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied. Thanks.
--
viresh
prev parent reply other threads:[~2026-08-31 6:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 13:19 Colin Ian King
2026-08-31 6:04 ` Viresh Kumar [this message]
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=apUZgrCjLxN-T031@vireshk-B250M-D3H \
--to=viresh.kumar@linaro.org \
--cc=colin.i.king@gmail.com \
--cc=egurvitz@nvidia.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=rob.herring@calxeda.com \
--cc=sboyd@kernel.org \
--cc=shawn.guo@linaro.org \
--cc=vireshk@kernel.org \
/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®