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] [day] [month] [year] [list]
Message-ID: <CACRpkdZ9L+Ssd9_Vcj2HwOpuYaX2_2MzAv8W+OWq+YEDi=-uMg@mail.gmail.com>
Date:   Wed, 21 Feb 2018 09:38:40 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Chen-Yu Tsai <wens@...e.org>,
        Maxime Ripard <maxime.ripard@...e-electrons.com>
Cc:     linux-gpio@...r.kernel.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: Handle deferred probing in of_find_gpio() properly

On Tue, Feb 13, 2018 at 7:08 AM, Chen-Yu Tsai <wens@...e.org> wrote:

> of_get_named_gpiod_flags() used directly in of_find_gpio() or indirectly
> through of_find_spi_gpio() or of_find_regulator_gpio() can return
> -EPROBE_DEFER. This gets overwritten by the subsequent of_find_*_gpio()
> calls.
>
> This patch fixes this by trying of_find_spi_gpio() or
> of_find_regulator_gpio() only if deferred probing was not requested by
> the previous of_get_named_gpiod_flags() call.
>
> Fixes: 6a537d48461d ("gpio: of: Support regulator nonstandard GPIO properties")
> Fixes: c85823390215 ("gpio: of: Support SPI nonstandard GPIO properties")
> Signed-off-by: Chen-Yu Tsai <wens@...e.org>

Patch applied,

>         /* Special handling for SPI GPIOs if used */
> -       if (IS_ERR(desc))
> +       if (IS_ERR(desc) && PTR_ERR(desc) != -EPROBE_DEFER)
>                 desc = of_find_spi_gpio(dev, con_id, &of_flags);

Dropped this hunk since Maxime's patch handles that.

>         /* Special handling for regulator GPIOs if used */
> -       if (IS_ERR(desc))
> +       if (IS_ERR(desc) && PTR_ERR(desc) != -EPROBE_DEFER)
>                 desc = of_find_regulator_gpio(dev, con_id, &of_flags);

Kept this.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ