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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 06:46:12 +0000 (08:46 +0200)
commit37457ac5a36c6e4f6c8b9064b7f52c55e6b0f190
tree47da41afe928558f05dd2263e150b623d1617531
parent3c19ebef016a4dc2098f3401e7954a0b44abb0b6
regulator: push allocation in set_consumer_device_supply() out of lock

commit 5c06540165d443c6455123eb48e7f1a9b618ab34 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/regulator/core.c