[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <60eb849f-29d5-4bfa-9cb3-3a3add653ab5@roeck-us.net>
Date: Mon, 11 Nov 2024 18:28:36 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Pei Xiao <xiaopei01@...inos.cn>
Cc: jdelvare@...e.com, linux-hwmon@...r.kernel.org,
linux-kernel@...r.kernel.org, xiaopeitux@...mail.com
Subject: Re: [PATCH] hwmon: (nct6775-core) Fix overflows seen when writing
limit attributes
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@...inos.cn>
> Fixes: c3963bc0a0cf ("hwmon: (nct6775) Split core and platform driver")
Applied.
Thanks,
Guenter
Powered by blists - more mailing lists