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 17:45:17 +0100 [thread overview]
Message-ID: <1503180.zM1PdPxpk1@wuerfel> (raw)
In-Reply-To: <1448988057-13965-1-git-send-email-broonie@kernel.org>
On Tuesday 01 December 2015 16:40:57 Mark Brown wrote:
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index daffff83ced2..f71db02fcb71 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -141,7 +141,7 @@ static void regulator_lock_supply(struct regulator_dev *rdev)
> int i;
>
> 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.
Arnd
next prev parent reply other threads:[~2015-12-01 16:45 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 [this message]
2015-12-01 16:53 ` Mark Brown
2015-12-01 19:37 ` Arnd Bergmann
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=1503180.zM1PdPxpk1@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®