linux/drivers/opp
Marijn Suijten 19526d092c opp: core: Check for pending links before reading required_opp pointers
Commit 4fa82a87ba ("opp: Allow required-opps to be used for non genpd
use cases") dereferences the pointers in required_opp_tables but these
might be set to an ERR_PTR if the list still has lazy links pending,
resulting in segfaults.  Prior to this patch IS_ERR was also checked on
required_opp_tables[i] before reading ->is_genpd inside
_opp_table_alloc_required_tables, which is at the same time the
predicate to add this table to the lazy list.  This segfault is solved
by reordering the checks to bail on lazy pending tables before reading
->is_genpd.

Fixes: 4fa82a87ba ("opp: Allow required-opps to be used for non genpd use cases")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-08-23 12:44:55 +05:30
..
core.c opp: core: Check for pending links before reading required_opp pointers 2021-08-23 12:44:55 +05:30
cpu.c opp: Remove _dev_pm_opp_find_and_remove_table() wrapper 2020-08-24 17:04:37 +05:30
debugfs.c opp: Expose bandwidth information via debugfs 2020-05-29 10:15:12 +05:30
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
of.c opp: remove WARN when no valid OPPs remain 2021-08-04 09:31:25 +05:30
opp.h opp: Don't drop extra references to OPPs accidentally 2021-03-12 09:26:52 +05:30
ti-opp-supply.c opp: ti-opp-supply: Replace HTTP links with HTTPS ones 2020-07-24 08:05:54 +05:30