Re: [PATCH] regulator: core: avoid regulator_resolve_supply() race condition

2021-01-22 Thread David Collins
Hello Mark, On 1/21/21 12:30 PM, Marek Szyprowski wrote: Hi Mark, On 21.01.2021 16:44, Mark Brown wrote: On Thu, Jan 21, 2021 at 10:41:59AM +0100, Marek Szyprowski wrote: On 18.01.2021 21:49, Mark Brown wrote: Does this help (completely untested): Sadly nope. I get same warning: Try this i

Re: [PATCH] regulator: core: avoid regulator_resolve_supply() race condition

2021-01-21 Thread Marek Szyprowski
Hi Mark, On 21.01.2021 16:44, Mark Brown wrote: > On Thu, Jan 21, 2021 at 10:41:59AM +0100, Marek Szyprowski wrote: >> On 18.01.2021 21:49, Mark Brown wrote: >>> Does this help (completely untested): >> Sadly nope. I get same warning: > Try this instead: > > diff --git a/drivers/regulator/core.c b

Re: [PATCH] regulator: core: avoid regulator_resolve_supply() race condition

2021-01-21 Thread Mark Brown
On Thu, Jan 21, 2021 at 10:41:59AM +0100, Marek Szyprowski wrote: > On 18.01.2021 21:49, Mark Brown wrote: > > Does this help (completely untested): > Sadly nope. I get same warning: Try this instead: diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 3ae5ccd9277d..31503776d

Re: [PATCH] regulator: core: avoid regulator_resolve_supply() race condition

2021-01-21 Thread Marek Szyprowski
Hi Mark, On 18.01.2021 21:49, Mark Brown wrote: > On Tue, Jan 12, 2021 at 10:34:19PM +0100, Marek Szyprowski wrote: >> == >> WARNING: possible circular locking dependency detected >> 5.11.0-rc1-8-geaa7995c529b #10095 Not tainted >> --

Re: [PATCH] regulator: core: avoid regulator_resolve_supply() race condition

2021-01-18 Thread Mark Brown
On Tue, Jan 12, 2021 at 10:34:19PM +0100, Marek Szyprowski wrote: > == > WARNING: possible circular locking dependency detected > 5.11.0-rc1-8-geaa7995c529b #10095 Not tainted > -- > swapper

Re: [PATCH] regulator: core: avoid regulator_resolve_supply() race condition

2021-01-18 Thread Naresh Kamboju
Hi, On Wed, 13 Jan 2021 at 03:21, Marek Szyprowski wrote: > > Hi, > > > This patch landed in linux next-20210112 as commit eaa7995c529b > ("regulator: core: avoid regulator_resolve_supply() race condition"). I > found that it triggers a following lockdep warning during the DWC3 > driver regist

Re: [PATCH] regulator: core: avoid regulator_resolve_supply() race condition

2021-01-12 Thread Marek Szyprowski
Hi, On 08.01.2021 02:16, David Collins wrote: > The final step in regulator_register() is to call > regulator_resolve_supply() for each registered regulator > (including the one in the process of being registered). The > regulator_resolve_supply() function first checks if rdev->supply > is NULL,

Re: [PATCH] regulator: core: avoid regulator_resolve_supply() race condition

2021-01-11 Thread Mark Brown
On Thu, 7 Jan 2021 17:16:02 -0800, David Collins wrote: > The final step in regulator_register() is to call > regulator_resolve_supply() for each registered regulator > (including the one in the process of being registered). The > regulator_resolve_supply() function first checks if rdev->supply >

[PATCH] regulator: core: avoid regulator_resolve_supply() race condition

2021-01-07 Thread David Collins
The final step in regulator_register() is to call regulator_resolve_supply() for each registered regulator (including the one in the process of being registered). The regulator_resolve_supply() function first checks if rdev->supply is NULL, then it performs various steps to try to find the supply.