Loading
drivers: thermal: Use lock before accessing thermal instance list
The thermal zone config read callback is not holding lock before
accessing thermal instance list. There is a chance that both cooling
device binding and thermal zone config show read are happening
concurrently. The cooling device binding tries to add new thermal
instances and the same time thermal zone config show read context
tries to access thermal instance list. It leads to unexpected
behaviour.
Use lock before accessing thermal instance list in thermal zone
config read callback.
Change-Id: I1bea07cb67a7240027dd34cea2ff61def9258b8f
Signed-off-by:
Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>