diff options
author | Mark Brown <broonie@kernel.org> | 2021-01-22 13:20:42 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-13 13:51:16 +0100 |
commit | 9dcaae42b61d8106056f027c4a09f443af0a6c7f (patch) | |
tree | 9b3936ecbf8da6b6782b407bc09f8b74bdb5b7de /net/netlink/af_netlink.c | |
parent | 45f9c1b2e57cb06b732dc21fda6e47477e802233 (diff) | |
download | linux-stable-9dcaae42b61d8106056f027c4a09f443af0a6c7f.tar.gz linux-stable-9dcaae42b61d8106056f027c4a09f443af0a6c7f.tar.bz2 linux-stable-9dcaae42b61d8106056f027c4a09f443af0a6c7f.zip |
regulator: Fix lockdep warning resolving supplies
[ Upstream commit 14a71d509ac809dcf56d7e3ca376b15d17bd0ddd ]
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.
Fixes: eaa7995c529b54 (regulator: core: avoid regulator_resolve_supply() race condition)
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210122132042.10306-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/netlink/af_netlink.c')
0 files changed, 0 insertions, 0 deletions