From: Arnd Bergmann <arnd@arndb.de>
To: Mark Brown <broonie@kernel.org>
Cc: Thierry Reding <treding@nvidia.com>,
linux-kernel@vger.kernel.org,
Tyler Baker <tyler.baker@linaro.org>
Subject: Re: [PATCH] regulator: core: Ensure we lock all regulators
Date: Tue, 01 Dec 2015 20:37:35 +0100 [thread overview]
Message-ID: <10014691.6gKPjN7Tsn@wuerfel> (raw)
In-Reply-To: <20151201165301.GM1929@sirena.org.uk>
On Tuesday 01 December 2015 16:53:01 Mark Brown wrote:
> On Tue, Dec 01, 2015 at 05:45:17PM +0100, Arnd Bergmann wrote:
> > On Tuesday 01 December 2015 16:40:57 Mark Brown wrote:
>
> > > mutex_lock(&rdev->mutex);
> > > - for (i = 1; rdev->supply; rdev = rdev->supply->rdev, i++)
> > > + for (i = 1; rdev; rdev = rdev->supply->rdev, i++)
> > > mutex_lock_nested(&rdev->mutex, i);
>
> > I think now we have a double lock, the initial mutex_lock() needs to
> > be removed again.
>
> Ugh, I even made that fix before I sent but didn't actually commit it
>
I'm glad I'm not the only one who can screw up a trivial one-line
fix to this damned function. ;-)
I'm still leading with three stupid mistakes over your one though.
Arnd
next prev parent reply other threads:[~2015-12-01 19:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 16:40 Mark Brown
2015-12-01 16:45 ` Arnd Bergmann
2015-12-01 16:53 ` Mark Brown
2015-12-01 19:37 ` Arnd Bergmann [this message]
2015-12-01 19:42 ` Mark Brown
2015-12-02 20:10 ` Applied "regulator: core: Ensure we lock all regulators" to the regulator tree Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10014691.6gKPjN7Tsn@wuerfel \
--to=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=treding@nvidia.com \
--cc=tyler.baker@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®