aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorMartin Blumenstingl <[email protected]>2024-02-25 16:13:35 +0100
committerDaniel Lezcano <[email protected]>2024-02-26 10:07:25 +0100
commite651f2fae33634175fae956d896277cf916f5d09 (patch)
tree372b66977f27f956c104887383b9af6efab2f8af /tools/perf/scripts/python/export-to-postgresql.py
parentf31c204850f9d93906b5ac8c203b2066524ff245 (diff)
clocksource/drivers/arm_global_timer: Guard against division by zero
The result of the division of new_rate by gt_target_rate can be zero (if new_rate is smaller than gt_target_rate). Using that result as divisor without checking can result in a division by zero error. Guard against this by checking for a zero value earlier. While here, also change the psv variable to an unsigned long to make sure we don't overflow the datatype as all other types involved are also unsiged long. Signed-off-by: Martin Blumenstingl <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions