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]
Date:   Wed, 31 May 2023 06:27:21 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jiawen Wu <jiawenwu@...stnetic.com>
Cc:     linus.walleij@...aro.org, brgl@...ev.pl,
        shreeya.patel@...labora.com, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpiolib: Fix GPIO chip IRQ initialization restriction

On Mon, May 29, 2023 at 10:44 AM Jiawen Wu <jiawenwu@...stnetic.com> wrote:
>
> In case of gpio-regmap, IRQ chip is added by regmap-irq and associated with
> GPIO chip by gpiochip_irqchip_add_domain(). The initialization flag was not
> added in gpiochip_irqchip_add_domain(), causing gpiochip_to_irq() to return
> -EPROBE_DEFER.

Makes sense to me.

> Fixes: 5467801f1fcb ("gpio: Restrict usage of GPIO chip irq members before initialization")
> Signed-off-by: Jiawen Wu <jiawenwu@...stnetic.com>

> Cc: shreeya.patel@...labora.com

This can be replaced with the --cc option.

...

>         gc->to_irq = gpiochip_to_irq;
>         gc->irq.domain = domain;

I'm wondering if you need the same (compiler) barrier here as in the
other place.

> +       gc->irq.initialized = true;

--
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ