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: <CAHp75Vexk_He78uHN-o4Cev4aUYM_doK6g-bvwfqgKwHm3mTvA@mail.gmail.com>
Date:   Fri, 16 Oct 2020 18:43:23 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jia He <justin.he@....com>
Cc:     Hoan Tran <hoan@...amperecomputing.com>,
        Serge Semin <fancer.lancer@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: dwapb: Fix missing conversion to GPIO-lib-based IRQ-chip

On Fri, Oct 16, 2020 at 6:36 PM Jia He <justin.he@....com> wrote:
>
> Commit 0ea683931adb ("gpio: dwapb: Convert driver to using the
> GPIO-lib-based IRQ-chip") missed the case in dwapb_irq_set_wake().
>
> Without this fix, probing the dwapb gpio driver will hit a error:
> "address between user and kernel address ranges" on a Ampere armv8a
> server and cause a panic.

Thank you for a fix!

Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>


> Fixes: 0ea683931adb ("gpio: dwapb: Convert driver to using the
> GPIO-lib-based IRQ-chip")

Should be one line. But I think Bart or Linus may fix this problem if
Serge is okay with a change in general.

> Signed-off-by: Jia He <justin.he@....com>
> ---
>  drivers/gpio/gpio-dwapb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
> index a5b326754124..2a9046c0fb16 100644
> --- a/drivers/gpio/gpio-dwapb.c
> +++ b/drivers/gpio/gpio-dwapb.c
> @@ -343,8 +343,8 @@ static int dwapb_irq_set_type(struct irq_data *d, u32 type)
>  #ifdef CONFIG_PM_SLEEP
>  static int dwapb_irq_set_wake(struct irq_data *d, unsigned int enable)
>  {
> -       struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d);
> -       struct dwapb_gpio *gpio = igc->private;
> +       struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
> +       struct dwapb_gpio *gpio = to_dwapb_gpio(gc);
>         struct dwapb_context *ctx = gpio->ports[0].ctx;
>         irq_hw_number_t bit = irqd_to_hwirq(d);
>
> --
> 2.17.1
>


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ