diff options
author | Jon Hunter <jonathanh@nvidia.com> | 2016-03-30 17:09:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-07 18:23:43 -0700 |
commit | 18055cbc5e852cda2b1dc7486f85e8af626d8a02 (patch) | |
tree | a525464277a2825e079abcf4812efad718a722cb /Makefile | |
parent | 55d37507a61b889945fac08f3ea7b3a0c8d95522 (diff) | |
download | lwn-18055cbc5e852cda2b1dc7486f85e8af626d8a02.tar.gz lwn-18055cbc5e852cda2b1dc7486f85e8af626d8a02.zip |
regulator: Fix deadlock during regulator registration
commit a2151374230820a3a6e654f2998b2a44dbfae4e1 upstream.
Commit 5e3ca2b349b1 ("regulator: Try to resolve regulators supplies on
registration") added a call to regulator_resolve_supply() within
regulator_register() where the regulator_list_mutex is held. This causes
a deadlock to occur on the Tegra114 Dalmore board when the palmas PMIC
is registered because regulator_register_resolve_supply() calls
regulator_dev_lookup() which may try to acquire the regulator_list_mutex
again.
Fix this by releasing the mutex before calling
regulator_register_resolve_supply() and update the error exit path to
ensure the mutex is released on an error.
[Made commit message more legible -- broonie]
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions