From: Guenter Roeck <linux@roeck-us.net>
To: Pei Xiao <xiaopei01@kylinos.cn>
Cc: jdelvare@suse.com, linux-hwmon@vger.kernel.org,
linux-kernel@vger.kernel.org, xiaopeitux@foxmail.com
Subject: Re: [PATCH] hwmon: (nct6775-core) Fix overflows seen when writing limit attributes
Date: Mon, 11 Nov 2024 18:28:36 -0800 [thread overview]
Message-ID: <60eb849f-29d5-4bfa-9cb3-3a3add653ab5@roeck-us.net> (raw)
In-Reply-To: <7d5084cea33f7c0fd0578c59adfff71f93de94d9.1731375425.git.xiaopei01@kylinos.cn>
On Tue, Nov 12, 2024 at 09:39:51AM +0800, Pei Xiao wrote:
> DIV_ROUND_CLOSEST() after kstrtoul() results in an overflow if a large
> number such as 18446744073709551615 is provided by the user.
> Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations.
>
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> Fixes: c3963bc0a0cf ("hwmon: (nct6775) Split core and platform driver")
Applied.
Thanks,
Guenter
prev parent reply other threads:[~2024-11-12 2:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 1:39 Pei Xiao
2024-11-12 2:28 ` Guenter Roeck [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=60eb849f-29d5-4bfa-9cb3-3a3add653ab5@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiaopei01@kylinos.cn \
--cc=xiaopeitux@foxmail.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®