summaryrefslogtreecommitdiff
path: root/kernel/debug/debug_core.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2026-10-27 17:19:15 +0100
committerJonathan Cameron <jonathan.cameron@oss.qualcomm.com>2026-11-11 02:53:02 +0000
commitfd4c92bbd3a64556e81042ff8d30545b15a3b93a (patch)
tree44bca988f9945162c16754cfd4a3cb97807de579 /kernel/debug/debug_core.h
parentbbe4f3f668babc9443fc1f075695e43e17ca7976 (diff)
iio: hid-sensors: fix a division by zero
convert_to_vtf_format() divides the micro part of a value by 10^(6 + exp). The unit exponent of a HID field is a nibble and goes down to -8. For -7 and -8 the argument of int_pow() is negative, which the unsigned parameter turns into a huge power of ten: 0 modulo 2^64. The division by it is a divide error. The exponent comes from the report descriptor of the sensor hub, the value from a write to the hysteresis attribute of the IIO device. Multiply by 10^(-exp - 6) in these two cases. Fixes: 73c6768b710a ("iio: hid-sensors: Common attribute and trigger") Cc: stable <stable@kernel.org> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'kernel/debug/debug_core.h')
0 files changed, 0 insertions, 0 deletions