linux/drivers/opp
Viresh Kumar cb60e9602c opp: Prevent memory leak in dev_pm_opp_attach_genpd()
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 <stephan@gerhold.net>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2020-09-16 14:02:33 +05:30
..
core.c opp: Prevent memory leak in dev_pm_opp_attach_genpd() 2020-09-16 14:02:33 +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: Allow opp-supported-hw to contain multiple versions 2020-09-16 14:02:33 +05:30
opp.h opp: Remove _dev_pm_opp_find_and_remove_table() wrapper 2020-08-24 17:04:37 +05:30
ti-opp-supply.c opp: ti-opp-supply: Replace HTTP links with HTTPS ones 2020-07-24 08:05:54 +05:30