OPP: Protect dev_list with opp_table lock
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 3 Aug 2018 01:35:21 +0000 (07:05 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:47:00 +0000 (18:47 +0100)
commit4c64ce947cfa447993efe005cbaad7ba31a91612
treeea91d140646f7daa08f469ac178de98b13dafa92
parent51e509caf5fad3a50860d588227bb6ae4388c7f2
OPP: Protect dev_list with opp_table lock

[ Upstream commit 3d2556992a878a2210d3be498416aee39e0c32aa ]

The dev_list needs to be protected with a lock, else we may have
simultaneous access (addition/removal) to it and that would be racy.
Extend scope of the opp_table lock to protect dev_list as well.

Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/opp/core.c
drivers/opp/cpu.c
drivers/opp/opp.h