lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 6 Aug 2015 16:53:13 +0900
From:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
To:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
Cc:	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 16:35 GMT+09:00 Krzysztof Kozlowski <k.kozlowski@...sung.com>:
> On 06.08.2015 16:29, Srinivas Kandagatla wrote:
>> Thanks Krzysztof
>>
>> On 06/08/15 02:39, Krzysztof Kozlowski wrote:
>>>> --- a/drivers/regulator/core.c
>>>> >+++ b/drivers/regulator/core.c
>>>> >@@ -2919,7 +2919,7 @@ static int _regulator_get_voltage(struct
>>>> regulator_dev *rdev)
>>>> >         } else if (rdev->desc->fixed_uV && (rdev->desc->n_voltages
>>>> == 1)) {
>>>> >                 ret = rdev->desc->fixed_uV;
>>>> >         } else if (rdev->supply) {
>>>> >-               ret = regulator_get_voltage(rdev->supply);
>>>> >+               ret = _regulator_get_voltage(rdev->supply->rdev);
>>> Is the 'rdev' and 'rdev->supply' same regulators? If not then you are
>>> just hiding false warning by removing locks thus introducing real
>>> issue...
>> They are the not the same regulators, and hence they are not locking the
>> same mutex, looks like this is a false positive warning from lockdep. I
>> can't think of any use case which could result in ABBA type lockup too,
>> so we can ignore this patch for now.
>>
>> Not sure why did the lockdep think that this is same lock :-)
>
> I think the warning appears because the class of lock is the same but
> there is nesting information:

Crap... s/there is nesting/there is no nesting/

Maybe it is worth to add it... or remove the lockdep warning if it hits often.

>         "May be due to missing lock nesting notation"
> Fixing this would require adding the nesting information.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ