Skip to content
Commit f0009360 authored by Zev Weiss's avatar Zev Weiss Committed by Guenter Roeck
Browse files

hwmon: (peci/cputemp) Fix off-by-one in coretemp_label allocation



The find_last_bit() call produces the index of the highest-numbered
core in core_mask; because cores are numbered from zero, the number of
elements we need to allocate is one more than that.

Signed-off-by: default avatarZev Weiss <zev@bewilderbeest.net>
Cc: stable@kernel.org # v5.18
Fixes: bf3608f3 ("hwmon: peci: Add cputemp driver")
Reviewed-by: default avatarIwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20230202021825.21486-1-zev@bewilderbeest.net


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 2fbb848b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment