From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752010AbeAEOXD (ORCPT + 1 other); Fri, 5 Jan 2018 09:23:03 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:45182 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751982AbeAEOXA (ORCPT ); Fri, 5 Jan 2018 09:23:00 -0500 X-Google-Smtp-Source: ACJfBovMWvoQKm4/hm/WUEdNs+dZIcMHKG/t34A4V0j6BNjL/pA3nP3qP82ngvHm5hwEvRTBdIUQ5w== Date: Fri, 5 Jan 2018 14:22:56 +0000 From: Lee Jones To: Sinan Kaya Cc: timur@codeaurora.org, chris2553@googlemail.com, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, bhelgaas@google.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] mfd: rtsx: release IRQ during shutdown Message-ID: <20180105142256.shtlbm2nmneu4qao@dell> References: <1514982766-18012-1-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1514982766-18012-1-git-send-email-okaya@codeaurora.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, 03 Jan 2018, Sinan Kaya wrote: > 'Commit cc27b735ad3a ("PCI/portdrv: Turn off PCIe services during > shutdown")' revealed a resource leak in rtsx_pci driver during shutdown. > > Issue shows up as a warning during shutdown as follows: > > remove_proc_entry: removing non-empty directory 'irq/17', leaking at least > 'rtsx_pci' > WARNING: CPU: 0 PID: 1578 at fs/proc/generic.c:572 > remove_proc_entry+0x11d/0x130 > Modules linked in > ... > Call Trace: > unregister_irq_proc > free_desc > irq_free_descs > mp_unmap_irq > acpi_unregister_gsi_apic > acpi_pci_irq_disable > do_pci_disable_device > pci_disable_device > device_shutdown > kernel_restart > Sys_reboot > > Even though rtsx_pci driver implements a shutdown callback, it is not > releasing the interrupt that it registered during probe. This is causing > the ACPI layer to complain that the shared IRQ is in use while freeing > IRQ. > > This code releases the IRQ to prevent resource leak and eliminate the > warning. > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=198141 > Reported-by: Chris Clayton > Fixes: cc27b735ad3a ("PCI/portdrv: Turn off PCIe services during shutdown") > Signed-off-by: Sinan Kaya > --- > drivers/mfd/rtsx_pcr.c | 3 +++ > 1 file changed, 3 insertions(+) Applied, thanks. -- Lee Jones Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog