android_kernel_motorola_sm6375/drivers/opp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Viresh Kumar 09b63105d0 opp: Prevent memory leak in dev_pm_opp_attach_genpd()
[ Upstream commit cb60e9602cce1593eb1e9cdc8ee562815078a354 ]

If dev_pm_opp_attach_genpd() is called multiple times (once for each CPU
sharing the table), then it would result in unwanted behavior like
memory leak, attaching the domain multiple times, etc.

Handle that by checking and returning earlier if the domains are already
attached. Now that dev_pm_opp_detach_genpd() can get called multiple
times as well, we need to protect that too.

Note that the virtual device pointers aren't returned in this case, as
they may become unavailable to some callers during the middle of the
operation.

Reported-by: Stephan Gerhold <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2020-10-29 09:58:06 +01:00
..
core.c opp: Prevent memory leak in dev_pm_opp_attach_genpd() 2020-10-29 09:58:06 +01:00
cpu.c
debugfs.c
Kconfig
Makefile
of.c opp: Increase parsed_static_opps in _of_add_opp_table_v1() 2020-10-01 13:18:11 +02:00
opp.h opp: Replace list_kref with a local counter 2020-10-01 13:17:26 +02:00
ti-opp-supply.c