From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754641AbbHFHxQ (ORCPT ); Thu, 6 Aug 2015 03:53:16 -0400 Received: from mail-qk0-f173.google.com ([209.85.220.173]:36250 "EHLO mail-qk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754578AbbHFHxO (ORCPT ); Thu, 6 Aug 2015 03:53:14 -0400 MIME-Version: 1.0 In-Reply-To: <55C30E46.809@samsung.com> References: <1438790528-4435-1-git-send-email-srinivas.kandagatla@linaro.org> <55C30CD9.9090408@linaro.org> <55C30E46.809@samsung.com> Date: Thu, 6 Aug 2015 16:53:13 +0900 X-Google-Sender-Auth: lUoXkIdSu0M1ZlqrlEmuXm0DiNA Message-ID: Subject: Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning From: Krzysztof Kozlowski To: Krzysztof Kozlowski Cc: Srinivas Kandagatla , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2015-08-06 16:35 GMT+09:00 Krzysztof Kozlowski : > 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.