diff options
author | Guenter Roeck <linux@roeck-us.net> | 2024-07-06 23:51:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-12 11:13:00 +0200 |
commit | 26825b62bd1bd3e53b4f44e0745cb516d5186343 (patch) | |
tree | 6cfe4c08cdc011e585be0667135cfb12bd0f702b /tools/lib/bpf/libbpf.c | |
parent | 996221b030995cc5f5baa4a642201d64b62a17cd (diff) |
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>
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
0 files changed, 0 insertions, 0 deletions