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, 31 Aug 2021 12:10:46 +0200
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        alexandru.marginean@....com, Laurentiu.Tudor@....com,
        Hui Song <hui.song_1@....com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Ran Wang <ran.wang_1@....com>,
        linux-gpio <linux-gpio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH 1/3] gpio: mpc8xxx: Fix a resources leak in the error
 handling path of 'mpc8xxx_probe()'

On Fri, Aug 20, 2021 at 5:37 PM Christophe JAILLET
<christophe.jaillet@...adoo.fr> wrote:
>
> Commit 698b8eeaed72 ("gpio/mpc8xxx: change irq handler from chained to normal")
> has introduced a new 'goto err;' at the very end of the function, but has
> not updated the error handling path accordingly.
>
> Add the now missing 'irq_domain_remove()' call which balances a previous
> 'irq_domain_create_linear() call.
>
> Fixes: 698b8eeaed72 ("gpio/mpc8xxx: change irq handler from chained to normal")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> Is the 'irq_set_chained_handler_and_data()' of the remove function also
> needed here?
> ---
>  drivers/gpio/gpio-mpc8xxx.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
> index 67dc38976ab6..241bcc80612e 100644
> --- a/drivers/gpio/gpio-mpc8xxx.c
> +++ b/drivers/gpio/gpio-mpc8xxx.c
> @@ -416,6 +416,8 @@ static int mpc8xxx_probe(struct platform_device *pdev)
>
>         return 0;
>  err:
> +       if (mpc8xxx_gc->irq)
> +               irq_domain_remove(mpc8xxx_gc->irq);
>         iounmap(mpc8xxx_gc->regs);
>         return ret;
>  }
> --
> 2.30.2
>

Applied, thanks!

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ