public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Lee Jones <lee.jones@linaro.org>
Cc: linaro-kernel@lists.linaro.org, broonie@kernel.org,
	ckeepax@opensource.wolfsonmicro.com,
	patches@opensource.wolfsonmicro.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V4] mfd: wm8994-core: Don't use managed regulator bulk get API
Date: Fri, 25 Nov 2016 16:11:10 +0530	[thread overview]
Message-ID: <20161125104110.GA14931@vireshk-i7> (raw)
In-Reply-To: <20161125104111.GC10134@dell.home>

On 25-11-16, 10:41, Lee Jones wrote:
> On Fri, 25 Nov 2016, Viresh Kumar wrote:
> 
> > On 25-11-16, 10:14, Lee Jones wrote:
> > > On Thu, 27 Oct 2016, 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 managed resources are freed isn't correct.
> > > > 
> > > > The regulators are added as children of wm8994->dev.  Whereas,
> > > > 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().
> > > 
> > > Is ...
> > > 
> > >    mfd: wm8994-core: disable regulators before removing them
> > > 
> > > ... required as well, or is that separate?
> > 
> > It would be better if we get that too. Anyway, the $subject patch has a
> > dependency on it..
> 
> Which is ... ?

I meant rebase dependency, nothing else.

-- 
viresh

      reply	other threads:[~2016-11-25 10:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27 10:20 [PATCH V4] mfd: wm8994-core: Don't use managed regulator bulk get API Viresh Kumar
2016-11-10  8:39 ` Lee Jones
2016-11-24 14:45   ` Ulf Hansson
2016-11-25 10:14 ` Lee Jones
2016-11-25 10:16   ` Viresh Kumar
2016-11-25 10:41     ` Lee Jones
2016-11-25 10:41       ` 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=20161125104110.GA14931@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