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]
Date:	Tue, 3 Jun 2014 10:49:32 +0100
From:	Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
To:	Mark Brown <broonie@...nel.org>
Cc:	lee.jones@...aro.org, sameo@...ux.intel.com,
	patches@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] mfd: core: Add the option to order destruction of
	MFD cells

On Mon, Jun 02, 2014 at 10:01:17PM +0100, Mark Brown wrote:
> On Mon, Jun 02, 2014 at 10:01:43AM +0100, Charles Keepax wrote:
> > Sometimes MFD children will have interdependancies. For example an MFD
> > device might contain a regulator cell and another cell which requires
> > that regulator to function. Probe deferral will ensure that these
> > devices probe in the correct order, however currently nothing ensures
> > they are destroyed in the correct order. As such it is possible for a
> > cell to be destroyed whilst another cell still expects it to exist. For
> > example the cell mentioned earlier would attempt to do a regulator_put
> > as part of its own tear-down but the regulator may have already been
> > destroyed.
> 
> Probe deferral is supposed to handle removal too, we're supposed to be
> able to walk the device list in reverse order and everything just work.

I had considered this approach but was perhaps incorrectly too
nervous about it. I was slightly concerned about breaking other
MFD devices by changing the order things destroy in. Also the way
the child devices are iterated with device_for_each_child, there is
lack of helpers to process the klist in reverse and it felt like
code I probably shouldn't be modifying.

I am happy to do a version that removes devices in reverse probe
order, if that is preferrable? But any pointers if I am missing
the obvious way to do that would be appreciated.

Thanks,
Charles
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ