lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161125104111.GC10134@dell.home>
Date:   Fri, 25 Nov 2016 10:41:11 +0000
From:   Lee Jones <lee.jones@...aro.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     linaro-kernel@...ts.linaro.org, broonie@...nel.org,
        ckeepax@...nsource.wolfsonmicro.com,
        patches@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V4] mfd: wm8994-core: Don't use managed regulator bulk
 get API

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 ... ?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ