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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_Jsq+JdmKj88Tp=N+V781qj+muEB6nuGpjDCgiPsrzB9tWMg@mail.gmail.com>
Date:   Wed, 14 Dec 2016 14:54:02 -0600
From:   Rob Herring <robh@...nel.org>
To:     Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc:     Frank Rowand <frowand.list@...il.com>,
        Pawel Moll <pawel.moll@....com>,
        Grant Likely <grant.likely@...retlab.ca>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] of/platform: depopulate devices in the reverse order of creation

On Mon, Dec 12, 2016 at 12:39 PM, Jason Gunthorpe
<jgunthorpe@...idianresearch.com> wrote:
> If the DT has inter-dependencies, then the devices need to be removed
> in the right order to avoid removal problems.
>
> Assuming the DT is constructed so that EPROBE_DEFER doesn't happen
> during creating then a good way to avoid removal problems is reversing
> the order during depopulation.

I assume you mean by sorting the nodes to get lucky with the init
order. Not sure I want any patches that help that. I'm tempted to
randomize the device creation order instead.

> Signed-off-by: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
> ---
>  drivers/of/platform.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> In my specific case I have a gpio driver, followed by a i2c bitbang
> using that driver. So gpiolib prints an error if it the gpio driver is
> removed before the gpio client..

Good news, functional dependencies are going into 4.10. Let's fix GPIO
and use that.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ