]> git.baikalelectronics.ru Git - kernel.git/commit
devfreq: rk3399_dmc: Don't use OPP structures outside of RCU locks
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 5 Dec 2016 03:23:52 +0000 (08:53 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 8 Dec 2016 00:46:07 +0000 (01:46 +0100)
commit88310f7d8968ff689755a5f14b6cae62876dccd5
tree5c4a2fa8a614c3592249972c54a6850c61aff126
parentec3c84f05e1e8b36ef77244626de07d770fd902d
devfreq: rk3399_dmc: Don't use OPP structures outside of RCU locks

The OPP structures are abused to the best here, without understanding
how the OPP core and RCU locks work.

In short, the OPP pointer saved in 'rk3399_dmcfreq' can become invalid
under your nose, as the OPP core may free it.

Fix various abuses around OPP structures and calls.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/devfreq/rk3399_dmc.c