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:   Sat, 14 May 2022 16:04:56 +0300
From:   Andy Shevchenko <andriy.shevchenko@...el.com>
To:     Zheyu Ma <zheyuma97@...il.com>
Cc:     andy@...nel.org, linus.walleij@...aro.org, brgl@...ev.pl,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] gpio: ml-ioh: Add devm_free_irq() call to remove flow

On Thu, May 12, 2022 at 08:47:55PM +0800, Zheyu Ma wrote:
> When removing the module, we will get the following flaw:
> 
> [   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.218264]  unregister_irq_proc+0x14c/0x170
> [   14.220206]  pci_disable_device+0x1ad/0x380
> [   14.220613]  ioh_gpio_remove+0xc5/0xe0 [gpio_ml_ioh]

I would expect something like:

  [   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.220613]  ioh_gpio_remove+0xc5/0xe0 [gpio_ml_ioh]
  [   14.221075]  pci_device_remove+0x92/0x240

It pretty much explains the case.

> Fix this bug by adding devm_free_irq() call to remove flow.


P.S. When sending a new version do not attach it to previous thread, always
     start a new one. It will be simpler to handle by tools.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ