linux-stable/drivers/base/power
Nikita Zhandarovich a11c6fcad2 PM: domains: fix integer overflow issues in genpd_parse_state()
[ Upstream commit e5d1c87220 ]

Currently, while calculating residency and latency values, right
operands may overflow if resulting values are big enough.

To prevent this, albeit unlikely case, play it safe and convert
right operands to left ones' type s64.

Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.

Fixes: 30f604283e ("PM / Domains: Allow domain power states to be read from DT")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:33:33 +02:00
..
opp opp: remove WARN when no valid OPPs remain 2021-09-03 09:56:25 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
clock_ops.c PM / clk: signedness bug in of_pm_clk_add_clks() 2018-09-05 09:26:42 +02:00
common.c
domain.c PM: domains: fix integer overflow issues in genpd_parse_state() 2023-08-11 11:33:33 +02:00
domain_governor.c PM / Domains: Fix missing default_power_down_ok comment 2017-06-29 01:24:36 +02:00
generic_ops.c
main.c PM: core: keep irq flags in device_pm_check_callbacks() 2022-04-20 09:08:22 +02:00
power.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qos.c PM / QoS: Use the correct variable to check the QoS request type 2017-09-18 13:38:30 +02:00
runtime.c Revert "PM: runtime: Update device status before letting suppliers suspend" 2021-03-24 11:04:55 +01:00
sysfs.c PM / QoS: return -EINVAL for bogus strings 2017-07-12 14:42:37 +02:00
trace.c PM: base: power: don't try to use non-existing RTC for storing data 2021-09-22 11:45:33 +02:00
wakeirq.c PM / wakeirq: Fix unbalanced IRQ enable for wakeirq 2018-04-26 11:02:20 +02:00
wakeup.c PM: sleep: Fix possible overflow in pm_system_cancel_wakeup() 2020-01-27 14:46:40 +01:00