From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751721AbbHTAHM (ORCPT ); Wed, 19 Aug 2015 20:07:12 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:61035 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751344AbbHTAHK (ORCPT ); Wed, 19 Aug 2015 20:07:10 -0400 X-AuditID: cbfec7f5-f794b6d000001495-e2-55d51a2bb853 Message-id: <55D51A2C.2060904@samsung.com> Date: Thu, 20 Aug 2015 09:07:08 +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: Geert Uytterhoeven Cc: Liam Girdwood , Mark Brown , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] regulator: Add lockdep asserts to help detecting locking misuse References: <1433917392-27845-1-git-send-email-k.kozlowski@samsung.com> In-reply-to: Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrHLMWRmVeSWpSXmKPExsVy+t/xy7raUldDDa78ULaY+vAJm8WzW3uZ LF6/MLT4dqWDyeLyrjlsDqweO2fdZffYtKqTzePQ4Q5Gj74tqxg9Pm+SC2CN4rJJSc3JLEst 0rdL4Mp4fWsJS8EfnoqfJ24yNzDe4Opi5OCQEDCR2N7M0cXICWSKSVy4t56ti5GLQ0hgKaPE 5tW/2CGcL4wSj1vvMoFU8QpoSexo7WQDsVkEVCV6js9iBLHZBIwlNi9fAhYXFYiQWL76JCNE vaDEj8n3WECWiQjoSsz5yQQyk1mgk1HiwMq5bCBxYYEwiRsLYiF29TFK/Lo0ixmkl1MgWOJ4 yx9mkBpmAXWJKVNyQcLMAvISm9e8ZZ7AKDALyYZZCFWzkFQtYGRexSiaWppcUJyUnmukV5yY W1yal66XnJ+7iRESyl93MC49ZnWIUYCDUYmHV0PsaqgQa2JZcWXuIUYJDmYlEd4zv66ECvGm JFZWpRblxxeV5qQWH2KU5mBREueduet9iJBAemJJanZqakFqEUyWiYNTqoHx4KJZ3xXaGyuX 6soLB1Sa9PRcWj+lVEwtzpZPTUPWc2KYf9mx6TUhAjX1ylmn3H1qhS5srrO/Yz7tGovozYTz UxNObL7xLGj5nYUGeT8YY7Yc9p7C+9j/3ernsfcSJJQOvPW8fVdwz/5ra6RnXRXy/fx57rV9 dT5TvrjnKAVFXk3d5R6i8jhbiaU4I9FQi7moOBEAA3GK1GECAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19.08.2015 22:08, Geert Uytterhoeven wrote: > Hi Krzysztof, > > On Wed, Jun 10, 2015 at 8:23 AM, Krzysztof Kozlowski > wrote: >> Add lockdep_assert_held_once() to functions explicitly mentioning that >> rdev or regulator_list mutex must be held. Using WARN_ONCE shouldn't >> pollute the dmesg to much. >> >> The patch (if CONFIG_LOCKDEP enabled) will show warnings in certain >> regulators calling regulator_notifier_call_chain() without rdev->mutex >> held. >> >> Signed-off-by: Krzysztof Kozlowski >> >> --- >> >> Warnings for missing locks when calling regulator_notifier_call_chain() >> should appear on many regulators except wm8350-regulator.c, e.g.: >> da9055-regulator.c, da9062-regulator.c, da9063-regulator.c, >> da9211-regulator.c, wm831x-dcdc.c and few more. >> >> The question is whether the lock during that call should be held? > > That was a (so far, not counting the "Applied, thanks!") unanswered question? > > For the first time ever, I got: > > drivers/regulator/core.c:3480 regulator_notifier_call_chain+0x54/0x80() > > due to da9210_irq_handler() not taking the mutex. > > Drivers calling regulator_notifier_call_chain() from a threaded interrupt > handler should be OK calling mutex_lock(). > > Does anyone have plans to fix all affected drivers? Question is still unanswered. I don't have plans to fix the drivers because I don't have necessary hardware. Blindly fixing such minor issue could do more harm than good. I just polluted the dmesg with WARN hoping that this will wake up someone :) . Best regards, Krzysztof