linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	"lrg@ti.com" <lrg@ti.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regulator: core: Add locked version of regulator_put to	avoid deadlock
Date: Tue, 13 Nov 2012 22:46:05 +0530	[thread overview]
Message-ID: <50A28055.7040606@nvidia.com> (raw)
In-Reply-To: <20121113163040.GA19089@opensource.wolfsonmicro.com>

On Tuesday 13 November 2012 10:00 PM, Charles Keepax wrote:
> When regulator_register fails and exits through the scrub path the
> regulator_put function was called whilst holding the
> regulator_list_mutex, which is also locked from regulator_put, causing
> deadlock.
>
> This patch adds a locked version of the regulator_put function which can
> be safely called whilst holding the mutex, replacing the aforementioned
> call.
>
> Signed-off-by: Charles Keepax<ckeepax@opensource.wolfsonmicro.com>
> Cc: Laxman Dewangan<ldewangan@nvidia.com>
> ---
>
> I hope this isn't bad etiquette but I took the liberaty of fixing up
> the patch as per the comments and taking into account the removal of
> my original patch. Apologies if this is not the done thing, do let
> me know if you would rather submit a version yourself but I
> thought best to address the issue and get a fix in.

This looks fine.
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>

  reply	other threads:[~2012-11-13 17:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-06 10:34 [PATCH] regulator: core: avoid memory access after freeing it Laxman Dewangan
2012-11-06 11:12 ` Charles Keepax
2012-11-06 11:31   ` Mark Brown
2012-11-13 16:30     ` [PATCH] regulator: core: Add locked version of regulator_put to avoid deadlock Charles Keepax
2012-11-13 17:16       ` Laxman Dewangan [this message]
2012-11-13 23:25       ` Mark Brown
2012-11-14  9:39         ` [PATCH v2] regulator: core: Avoid deadlock when regulator_register fails Charles Keepax
2012-11-14 10:01           ` 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=50A28055.7040606@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    /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;
as well as URLs for NNTP newsgroup(s).