From: Laxman Dewangan <ldewangan@nvidia.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
"lrg@ti.com" <lrg@ti.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"patches@opensource.wolfsonmicro.com"
<patches@opensource.wolfsonmicro.com>
Subject: Re: [PATCH] regulator: core: Move regulator release to avoid deadlock
Date: Wed, 31 Oct 2012 16:03:59 +0530 [thread overview]
Message-ID: <5090FE97.7070303@nvidia.com> (raw)
In-Reply-To: <20121029161416.GE4511@opensource.wolfsonmicro.com>
On Monday 29 October 2012 09:44 PM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Mon, Oct 29, 2012 at 09:33:33AM +0000, Charles Keepax wrote:
>> regulator_put function was called whilst holding the
>> regulator_list_mutex, which is also locked from regulator_put. This
>> causes deadlock when failing to register a regulator.
> Applied, thanks.
This patch create the crash in following case:
- If there is of rail supply and supply does not found. In this case it
goes to scrub and rdev->supply at this point shows NULL but when call
the function device_unregister(&rdev->dev), the rdev->supply becomes
random pointer.
What happen if we do the device_unregister() outside the mutex lock?
next prev parent reply other threads:[~2012-10-31 10:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-29 9:33 [PATCH] regulator: core: Move regulator release to avoid deadlock Charles Keepax
2012-10-29 16:14 ` Mark Brown
2012-10-31 10:33 ` Laxman Dewangan [this message]
2012-10-31 12:01 ` Charles Keepax
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=5090FE97.7070303@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 \
--cc=patches@opensource.wolfsonmicro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.