Guenter Roeck
9c01d650e1
hwmon: (w83627ehf) Fix underflows seen when writing limit attributes
...
[ Upstream commit 5c1de37969b7bc0abcb20b86e91e70caebbd4f89 ]
DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large
negative number such as -9223372036854775808 is provided by the user.
Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 93cf73a7bfdce683bde3a7bb65f270d3bd24497b)
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-10-30 14:08:23 +00:00
..
2022-04-20 09:08:13 +02:00
2023-12-13 16:46:16 +01:00
2016-06-27 18:58:03 -07:00
2017-04-02 07:01:53 -07:00
2024-10-30 14:08:23 +00:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2017-08-13 08:24:38 -07:00
2017-04-02 07:01:53 -07:00
2016-06-27 18:58:03 -07:00
2017-01-02 10:19:45 -08:00
2017-11-02 11:10:55 +01:00
2017-01-02 10:19:45 -08:00
2020-03-11 18:03:08 +01:00
2022-05-12 12:17:10 +02:00
2024-10-10 10:27:19 +00:00
2024-05-30 09:00:38 +00:00
2020-09-09 19:03:06 +02:00
2017-01-02 10:19:45 -08:00
2017-08-30 06:31:49 -07:00
2024-03-08 08:21:36 +00:00
2017-03-23 12:01:57 -07:00
2017-01-02 10:19:45 -08:00
2024-03-21 13:32:17 +00:00
2020-05-20 08:17:09 +02:00
2022-02-16 12:44:52 +01:00
2017-01-10 08:57:55 -08:00
2017-06-11 17:08:19 -07:00
2017-01-02 10:19:45 -08:00
2016-12-12 11:33:44 -08:00
2020-07-22 09:22:28 +02:00
2019-05-31 06:47:27 -07:00
2022-05-18 09:18:07 +02:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2017-08-29 17:44:23 -07:00
2017-01-02 10:19:45 -08:00
2017-02-27 18:43:47 -08:00
2017-01-10 08:58:36 -08:00
2017-01-10 08:59:35 -08:00
2022-09-15 12:23:50 +02:00
2018-02-22 15:42:24 +01:00
2021-11-26 11:40:30 +01:00
2017-08-13 08:24:38 -07:00
2022-12-08 11:16:31 +01:00
2022-07-07 17:31:17 +02:00
2022-12-08 11:16:31 +01:00
2018-11-27 16:10:48 +01:00
2016-09-08 21:34:17 -07:00
2018-12-17 09:28:48 +01:00
2017-04-21 12:30:09 -07:00
2019-11-24 08:23:31 +01:00
2023-04-05 11:14:16 +02:00
2020-05-02 17:24:45 +02:00
2017-01-02 10:19:45 -08:00
2018-02-22 15:42:24 +01:00
2018-02-22 15:42:24 +01:00
2022-05-18 09:18:06 +02:00
2017-04-02 07:01:53 -07:00
2017-01-21 12:26:38 -08:00
2020-01-27 14:46:44 +01:00
2017-01-02 10:19:45 -08:00
2021-05-26 11:47:00 +02:00
2017-01-02 10:19:45 -08:00
2017-04-02 07:01:53 -07:00
2017-04-13 06:09:26 -07:00
2022-02-08 18:16:26 +01:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2024-10-30 14:08:23 +00:00
2016-09-13 07:28:01 -07:00
2017-04-02 07:01:53 -07:00
2023-03-11 16:26:39 +01:00
2017-01-21 08:57:41 -08:00
2017-06-11 17:08:19 -07:00
2017-09-01 07:24:14 -07:00
2017-11-02 11:10:55 +01:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2017-06-11 17:08:19 -07:00
2017-01-02 10:19:45 -08:00
2024-10-10 10:27:20 +00:00
2021-07-20 16:17:35 +02:00
2021-07-20 16:17:35 +02:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2024-10-30 14:08:23 +00:00
2023-08-11 11:33:53 +02:00
2016-09-08 21:34:18 -07:00
2017-01-02 10:19:45 -08:00
2016-09-08 21:34:15 -07:00
2017-01-02 10:19:45 -08:00
2019-05-31 06:47:27 -07:00
2017-01-02 10:19:45 -08:00
2019-11-24 08:23:31 +01:00
2022-04-20 09:08:13 +02:00
2017-01-02 10:19:45 -08:00
2016-04-25 07:26:29 -07:00
2021-06-30 08:48:52 -04:00
2016-07-31 14:56:36 -07:00
2017-02-16 06:49:05 -08:00
2017-01-02 10:19:45 -08:00
2020-01-27 14:46:46 +01:00
2017-01-02 10:19:45 -08:00
2019-05-31 06:47:27 -07:00
2019-05-31 06:47:27 -07:00
2017-01-02 10:19:45 -08:00
2017-08-13 08:24:08 -07:00
2016-12-02 13:28:05 -08:00
2017-10-24 06:17:14 -07:00
2017-04-24 06:30:41 -07:00
2016-12-09 21:54:25 -08:00
2017-01-10 09:01:32 -08:00
2021-10-06 15:05:08 +02:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2019-05-31 06:47:27 -07:00
2017-01-02 10:19:45 -08:00
2024-10-30 14:08:23 +00:00
2020-01-27 14:46:29 +01:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2017-01-02 10:19:45 -08:00
2018-12-17 09:28:49 +01:00
2023-03-22 13:26:15 +01:00