From: Viresh Kumar <viresh.kumar@linaro.org>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Lee Jones <lee.jones@linaro.org>,
linaro-kernel@lists.linaro.org, broonie@kernel.org,
patches@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] mfd: wm8994-core: Don't use managed regulator bulk get API
Date: Thu, 27 Oct 2016 15:51:02 +0530 [thread overview]
Message-ID: <20161027102102.GE10423@vireshk-i7> (raw)
In-Reply-To: <20161027091413.GI28180@localhost.localdomain>
On 27-10-16, 10:14, Charles Keepax wrote:
> On Thu, Oct 27, 2016 at 09:09:30AM +0530, Viresh Kumar wrote:
> > The kernel WARNs and then crashes today if wm8994_device_init() fails
> > after calling devm_regulator_bulk_get().
> >
> > That happens because there are multiple devices involved here and the
> > order in which resources are freed isn't correct.
> >
> > The regulators are added as children of wm8994->dev.
> > devm_regulator_bulk_get() receives wm8994->dev as the device, though it
> > gets the same regulators which were added as children of wm8994->dev
> > earlier.
> >
> > During failures, the children are removed first and the core eventually
> > calls regulator_unregister() for them. As regulator_put() was never done
> > for them (opposite of devm_regulator_bulk_get()), the kernel WARNs at
> >
> > WARN_ON(rdev->open_count);
> >
> > And eventually it crashes from debugfs_remove_recursive().
> >
> > --------x------------------x----------------
>
> The back track seems to have got really really long again.
Not just that, even the code moved a version back.
Sorry for the noise, the right version is sent now :(
--
viresh
prev parent reply other threads:[~2016-10-27 14:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 3:39 [PATCH V3] mfd: wm8994-core: Don't use managed regulator bulk get API Viresh Kumar
2016-10-27 9:14 ` Charles Keepax
2016-10-27 10:21 ` Viresh Kumar [this message]
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=20161027102102.GE10423@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=lee.jones@linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox