mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Pascal Terjan <pterjan@google.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vboxguest: add missing devm_free_irq
Date: Fri, 10 Jun 2022 15:50:18 +0200	[thread overview]
Message-ID: <YqNMGgwsjhB7TNzk@kroah.com> (raw)
In-Reply-To: <20220609134057.2485190-1-pterjan@google.com>

On Thu, Jun 09, 2022 at 02:40:57PM +0100, Pascal Terjan wrote:
> This fixes the following warning when unloading the module:
> 
> [249348.837181] remove_proc_entry: removing non-empty directory 'irq/20', leaking at least 'vboxguest'
> [249348.837219] WARNING: CPU: 0 PID: 6708 at fs/proc/generic.c:715 remove_proc_entry+0x119/0x140
> 
> [249348.837379] Call Trace:
> [249348.837385]  unregister_irq_proc+0xbd/0xe0
> [249348.837392]  free_desc+0x23/0x60
> [249348.837396]  irq_free_descs+0x4a/0x70
> [249348.837401]  irq_domain_free_irqs+0x160/0x1a0
> [249348.837452]  mp_unmap_irq+0x5c/0x60
> [249348.837458]  acpi_unregister_gsi_ioapic+0x29/0x40
> [249348.837463]  acpi_unregister_gsi+0x17/0x30
> [249348.837467]  acpi_pci_irq_disable+0xbf/0xe0
> [249348.837473]  pcibios_disable_device+0x20/0x30
> [249348.837478]  pci_disable_device+0xef/0x120
> [249348.837482]  vbg_pci_remove+0x6c/0x70 [vboxguest]
> 
> Signed-off-by: Pascal Terjan <pterjan@google.com>
> ---
>  drivers/virt/vboxguest/vboxguest_linux.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/virt/vboxguest/vboxguest_linux.c b/drivers/virt/vboxguest/vboxguest_linux.c
> index 6e8c0f1c1056..faa4bc9f625c 100644
> --- a/drivers/virt/vboxguest/vboxguest_linux.c
> +++ b/drivers/virt/vboxguest/vboxguest_linux.c
> @@ -423,6 +423,7 @@ static void vbg_pci_remove(struct pci_dev *pci)
>  	vbg_gdev = NULL;
>  	mutex_unlock(&vbg_gdev_mutex);
>  
> +	devm_free_irq(gdev->dev, pci->irq, gdev);

The whope point of using devm_* calls is so you don't have to do stuff
like this.  Perhaps this should not be using devm_() for the irq at all?

thanks,

greg k-h

  reply	other threads:[~2022-06-10 13:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09 13:40 Pascal Terjan
2022-06-10 13:50 ` Greg Kroah-Hartman [this message]
2022-06-10 15:00   ` Pascal Terjan
2022-06-10 16:02     ` Hans de Goede
2022-06-12 13:37       ` [PATCH v2] vboxguest: Do not use devm for irq Pascal Terjan
2022-06-12 14:13         ` Hans de Goede

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=YqNMGgwsjhB7TNzk@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pterjan@google.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®