regulator: push allocation in set_consumer_device_supply() out of lock
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Wed, 12 Aug 2020 01:31:36 +0000 (03:31 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 17 Aug 2020 12:13:52 +0000 (13:13 +0100)
commit5c06540165d443c6455123eb48e7f1a9b618ab34
treefa7b5141723fd624142a4d86ff512971ae18849d
parent87fe29b61f9522a3d7b60a4580851f548558186f
regulator: push allocation in set_consumer_device_supply() out of lock

Pull regulator_list_mutex into set_consumer_device_supply() and keep
allocations outside of it. Fourth of the fs_reclaim deadlock case.

Fixes: 45389c47526d ("regulator: core: Add early supply resolution for regulators")
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/f0380bdb3d60aeefa9693c4e234d2dcda7e56747.1597195321.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c