diff options
| author | Guenter Roeck <[email protected]> | 2018-06-12 22:19:35 +0000 |
|---|---|---|
| committer | Guenter Roeck <[email protected]> | 2018-06-16 23:40:36 +0000 |
| commit | 91bb8f45f73f19a0150c233c0f11cdeb6d71d1e9 (patch) | |
| tree | 5ba2dea6276d352c94ab8b5fb20be09083d41ad6 /tools/perf/scripts/python | |
| parent | hwmon: (dell-smm) Disable fan support for Dell XPS13 9333 (diff) | |
| download | kernel-91bb8f45f73f19a0150c233c0f11cdeb6d71d1e9.tar.gz kernel-91bb8f45f73f19a0150c233c0f11cdeb6d71d1e9.zip | |
hwmon: (nct6775) Fix loop limit
Commit cc66b3038254 ("hwmon: (nct6775) Rework temperature source and label
handling") changed a loop limit from "data->temp_label_num - 1" to "32",
as part of moving from a string array to a bit mask. This results in the
following error, reported by UBSAN.
UBSAN: Undefined behaviour in drivers/hwmon/nct6775.c:4179:27
shift exponent 32 is too large for 32-bit type 'long unsigned int'
Similar to the original loop, the limit has to be one less than the
number of bits.
Fixes: cc66b3038254 ("hwmon: (nct6775) Rework temperature source and label handling")
Reported-by: Paul Menzel <[email protected]>
Cc: Paul Menzel <[email protected]>
Tested-by: Paul Menzel <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
