diff options
author | Pei Xiao <xiaopei01@kylinos.cn> | 2024-11-12 09:39:51 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-09 10:31:49 +0100 |
commit | 685c10269c41d23d7a2b85d3fd6b6345390c8746 (patch) | |
tree | 1cbb347f9224c1dc629accbb5a58b2f9808996f2 /drivers/acpi/cppc_acpi.c | |
parent | 4ffcf7893f4bed58c90477d7be03ed8805b82201 (diff) |
hwmon: (nct6775-core) Fix overflows seen when writing limit attributes
[ Upstream commit 57ee12b6c514146c19b6a159013b48727a012960 ]
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")
Message-ID: <7d5084cea33f7c0fd0578c59adfff71f93de94d9.1731375425.git.xiaopei01@kylinos.cn>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/acpi/cppc_acpi.c')
0 files changed, 0 insertions, 0 deletions