Re: [PATCH] regulator: Fix lockdep warning resolving supplies

From: Mark Brown
Date: Fri Jan 22 2021 - 09:51:45 EST


On Fri, 22 Jan 2021 13:20:42 +0000, Mark Brown wrote:
> With commit eaa7995c529b54 (regulator: core: avoid
> regulator_resolve_supply() race condition) we started holding the rdev
> lock while resolving supplies, an operation that requires holding the
> regulator_list_mutex. This results in lockdep warnings since in other
> places we take the list mutex then the mutex on an individual rdev.
>
> Since the goal is to make sure that we don't call set_supply() twice
> rather than a concern about the cost of resolution pull the rdev lock
> and check for duplicate resolution down to immediately before we do the
> set_supply() and drop it again once the allocation is done.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/1] regulator: Fix lockdep warning resolving supplies
commit: 14a71d509ac809dcf56d7e3ca376b15d17bd0ddd

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark