summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait.rb@renesas.com>2026-09-16 11:59:59 +0000
committerDaniel Lezcano <daniel.lezcano@kernel.org>2026-09-21 17:47:38 +0200
commit84f0e14e6261ef718e6a8583073097ad9ea70e14 (patch)
tree67d2fe0f8dfff6eb50724d0d332b4643f388b845 /tools/perf/scripts/python/task-analyzer.py
parent5e3d33c3fdf3761cc95fcdd815259493b803fa4a (diff)
drivers/thermal/renesas/rzg3e: Fix signed integer overflow in temp_to_code()
The thermal core passes -INT_MAX/INT_MAX as low/high trip points, which the driver then converts to code values for programming the registers: numerator = (temp_mc - info->temp_d_mc) * (priv->trmval1 - priv->trmval0); Although 'numerator' is defined as s64, the arithmetic is performed as int. Because of this, the multiplication overflows for -INT_MAX and, because temp_d_mc is negative, the subtraction overflows for INT_MAX. To fix this, cast the temperature to s64, so that the arithmetic is performed as s64. Fixes: dc67521c20b7 ("thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC") Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org> Link: https://patch.msgid.link/20260916120003.87018-2-ovidiu.panait.rb@renesas.com
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions