Home
last modified time | relevance | path

Searched hist:"19526 d092ceb32d619fce73fe0bdca4370890124" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/opp/
H A Dcore.cdiff 19526d092ceb32d619fce73fe0bdca4370890124 Sun Aug 22 12:44:10 CDT 2021 Marijn Suijten <marijn.suijten@somainline.org> opp: core: Check for pending links before reading required_opp pointers

Commit 4fa82a87ba55 ("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: 4fa82a87ba55 ("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>