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:   Thu, 12 May 2022 20:50:48 +0800
From:   Zheyu Ma <zheyuma97@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Andy Shevchenko <andy@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: ml-ioh: Add devm_free_irq() call to remove flow

On Thu, May 12, 2022 at 8:03 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> On Thu, May 12, 2022 at 1:21 PM Zheyu Ma <zheyuma97@...il.com> wrote:
> >
> > When removing the module, we will get the following flaw:
>
> Thanks for the report and patch! My comments below.
>
> > [   14.204955] remove_proc_entry: removing non-empty directory 'irq/21', leaking at least 'gpio_ml_ioh'
> > [   14.205827] WARNING: CPU: 0 PID: 305 at fs/proc/generic.c:717 remove_proc_entry+0x389/0x3f0
> > [   14.209994] RIP: 0010:remove_proc_entry+0x389/0x3f0
> > [   14.217820] Call Trace:
> > [   14.218057]  <TASK>
> > [   14.218264]  unregister_irq_proc+0x14c/0x170
> > [   14.218674]  irq_free_descs+0x94/0xe0
> > [   14.219019]  mp_unmap_irq+0xb6/0x100
> > [   14.219357]  acpi_unregister_gsi_ioapic+0x27/0x40
> > [   14.219796]  acpi_pci_irq_disable+0x1d3/0x320
> > [   14.220206]  pci_disable_device+0x1ad/0x380
> > [   14.220613]  ioh_gpio_remove+0xc5/0xe0 [gpio_ml_ioh]
> > [   14.221075]  pci_device_remove+0x92/0x240
>
> Can we remove not so important lines from the above? I guess ~3-4
> selected ones would be enough.
>
> > Fix this bug by adding devm_free_irq() call to remove flow.
>
> Fixes tag?
>
> > Signed-off-by: Zheyu Ma <zheyuma97@...il.com>
>
> The code looks okay on the first glance.
>
> P.S. Do you have such hardware?

Thanks for your comments, I've resend the patch.
Actually, I do not have the hardware. I test the driver with a virtual
device instead.

Zheyu Ma

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ