Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1209824 > unrolled thread
| Started by | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| First post | 2015-08-19 15:10 +0200 |
| Last post | 2015-08-20 02:10 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] regulator: Add lockdep asserts to help detecting locking misuse Geert Uytterhoeven <geert@linux-m68k.org> - 2015-08-19 15:10 +0200
Re: [PATCH] regulator: Add lockdep asserts to help detecting locking misuse Mark Brown <broonie@kernel.org> - 2015-08-19 18:30 +0200
Re: [PATCH] regulator: Add lockdep asserts to help detecting locking misuse Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-08-20 02:10 +0200
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2015-08-19 15:10 +0200 |
| Subject | Re: [PATCH] regulator: Add lockdep asserts to help detecting locking misuse |
| Message-ID | <pZbhT-6NN-5@gated-at.bofh.it> |
Hi Krzysztof,
On Wed, Jun 10, 2015 at 8:23 AM, Krzysztof Kozlowski
<k.kozlowski@samsung.com> 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 <k.kozlowski@samsung.com>
>
> ---
>
> 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?
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2015-08-19 18:30 +0200 |
| Subject | Re: [PATCH] regulator: Add lockdep asserts to help detecting locking misuse |
| Message-ID | <pZeps-2N8-17@gated-at.bofh.it> |
| In reply to | #1209824 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Aug 19, 2015 at 03:08:34PM +0200, Geert Uytterhoeven wrote: > 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? I'm not aware of anyone who's shown an interest.
[toc] | [prev] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2015-08-20 02:10 +0200 |
| Subject | Re: [PATCH] regulator: Add lockdep asserts to help detecting locking misuse |
| Message-ID | <pZlAC-4OU-13@gated-at.bofh.it> |
| In reply to | #1209824 |
On 19.08.2015 22:08, Geert Uytterhoeven wrote: > Hi Krzysztof, > > On Wed, Jun 10, 2015 at 8:23 AM, Krzysztof Kozlowski > <k.kozlowski@samsung.com> 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 <k.kozlowski@samsung.com> >> >> --- >> >> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web