mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Zheyu Ma <zheyuma97@gmail.com>
Cc: andy@kernel.org, linus.walleij@linaro.org, brgl@bgdev.pl,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] gpio: ml-ioh: Add devm_free_irq() call to remove flow
Date: Sat, 14 May 2022 16:04:56 +0300	[thread overview]
Message-ID: <Yn+o+CgAsyW7asSK@smile.fi.intel.com> (raw)
In-Reply-To: <20220512124755.2360648-1-zheyuma97@gmail.com>

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



  parent reply	other threads:[~2022-05-14 13:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 11:21 [PATCH] " Zheyu Ma
2022-05-12 12:02 ` Andy Shevchenko
2022-05-12 12:47   ` [PATCH v2] " Zheyu Ma
2022-05-14 12:50     ` Bartosz Golaszewski
2022-05-14 13:04     ` Andy Shevchenko [this message]
2022-05-12 12:50   ` [PATCH] " Zheyu Ma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yn+o+CgAsyW7asSK@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zheyuma97@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®