1
0
Fork 0
alistair23-linux/drivers/opp
Viresh Kumar b19c23551b opp: Reinitialize the list_kref before adding the static OPPs again
The list_kref reaches a count of 0 when all the static OPPs are removed,
for example when dev_pm_opp_of_cpumask_remove_table() is called, though
the actual OPP table may not get freed as it may still be referenced by
other parts of the kernel, like from a call to
dev_pm_opp_set_supported_hw(). And if we call
dev_pm_opp_of_cpumask_add_table() again at this point, we must
reinitialize the list_kref otherwise the kernel will hit a WARN() in
kref infrastructure for incrementing a kref with value 0.

Fixes: 11e1a16482 ("opp: Don't decrement uninitialized list_kref")
Reported-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-10-23 10:58:44 +05:30
..
Kconfig pci-v5.3-changes 2019-07-15 20:44:49 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
core.c opp: core: Revert "add regulators enable and disable" 2019-10-21 07:58:12 +05:30
cpu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
debugfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
of.c opp: Reinitialize the list_kref before adding the static OPPs again 2019-10-23 10:58:44 +05:30
opp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ti-opp-supply.c opp: ti-opp-supply: Fix platform_no_drv_owner.cocci warnings 2018-11-22 11:46:02 +05:30