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]
Message-ID: <CAMuHMdVSkPFsuCbVuWgpzh_8XOrYoiHbKQ4TqS_vv7_rCup2qw@mail.gmail.com>
Date:	Wed, 19 Aug 2015 15:08:34 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
Cc:	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regulator: Add lockdep asserts to help detecting locking misuse

Hi Krzysztof,

On Wed, Jun 10, 2015 at 8:23 AM, Krzysztof Kozlowski
<k.kozlowski@...sung.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@...sung.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@...ux-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@...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