From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754768AbbHFHfg (ORCPT ); Thu, 6 Aug 2015 03:35:36 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:36250 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751696AbbHFHfe (ORCPT ); Thu, 6 Aug 2015 03:35:34 -0400 X-AuditID: cbfec7f4-f79c56d0000012ee-d9-55c30e44c217 Message-id: <55C30E46.809@samsung.com> Date: Thu, 06 Aug 2015 16:35:34 +0900 From: Krzysztof Kozlowski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-version: 1.0 To: Srinivas Kandagatla Cc: Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning References: <1438790528-4435-1-git-send-email-srinivas.kandagatla@linaro.org> <55C30CD9.9090408@linaro.org> In-reply-to: <55C30CD9.9090408@linaro.org> Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t/xK7oufIdDDfZ+5beY+vAJm8XrF4YW 3650MFlc3jWHzaLt2DFWB1aPnbPusntsWtXJ5nHn2h42j74tqxg9Pm+SC2CN4rJJSc3JLEst 0rdL4Mp4evkie8F+roqnVxayNjBO4ehi5OSQEDCRONt7mxHCFpO4cG89WxcjF4eQwFJGiTU/ PzNBOF8YJeb8mAFWxSugJrFp93cmEJtFQFXi7LFNbCA2m4CxxOblS8BsUYEIieWrT0LVC0r8 mHyPBcQWEbCQ+DdhLjOIzSyQITFj+hywuLCAu8TmS9NZIZZtYZR4ueUDWBGngJbE/APtQDYH UIO6xJQpuRC98hKb17xlnsAoMAvJilkIVbOQVC1gZF7FKJpamlxQnJSea6hXnJhbXJqXrpec n7uJERLOX3YwLj5mdYhRgINRiYf3wZpDoUKsiWXFlbmHGCU4mJVEeLdeAArxpiRWVqUW5ccX leakFh9ilOZgURLnnbvrfYiQQHpiSWp2ampBahFMlomDU6qBkW9K6ZI++VLRrFsJV378sD08 d9b534Kh9o03T/1/La+4UF1lSe/Po3ed3v38IiWVfnCBmxivj82s2e21EzY6FyW1+k9a35v9 kVNcivn31Xdm7Ud/v1/laByQouap/ez2791ixYek5SpYZO53OX6docNee0qqwE3Vdk9N/jQj N+f/G2+8OBWRoMRSnJFoqMVcVJwIAAId91VjAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: "May be due to missing lock nesting notation" Fixing this would require adding the nesting information. Best regards, Krzysztof