Yinghai Lu
afe3e4d11b
PCI/PME: Restore pcie_pme_driver.remove
...
In addition to making PME non-modular, d7def20400 ("PCI/PME: Make
explicitly non-modular") removed the pcie_pme_driver .remove() method,
pcie_pme_remove().
pcie_pme_remove() freed the PME IRQ that was requested in pci_pme_probe().
The fact that we don't free the IRQ after d7def20400 causes the following
crash when removing a PCIe port device via /sys:
------------[ cut here ]------------
kernel BUG at drivers/pci/msi.c:370!
invalid opcode: 0000 [#1 ] SMP
Modules linked in:
CPU: 1 PID: 14509 Comm: sh Tainted: G W 4.8.0-rc1-yh-00012-gd29438d
RIP: 0010:[<ffffffff9758bbf5>] free_msi_irqs+0x65/0x190
...
Call Trace:
[<ffffffff9758cda4>] pci_disable_msi+0x34/0x40
[<ffffffff97583817>] cleanup_service_irqs+0x27/0x30
[<ffffffff97583e9a>] pcie_port_device_remove+0x2a/0x40
[<ffffffff97584250>] pcie_portdrv_remove+0x40/0x50
[<ffffffff97576d7b>] pci_device_remove+0x4b/0xc0
[<ffffffff9785ebe6>] __device_release_driver+0xb6/0x150
[<ffffffff9785eca5>] device_release_driver+0x25/0x40
[<ffffffff975702e4>] pci_stop_bus_device+0x74/0xa0
[<ffffffff975704ea>] pci_stop_and_remove_bus_device_locked+0x1a/0x30
[<ffffffff97578810>] remove_store+0x50/0x70
[<ffffffff9785a378>] dev_attr_store+0x18/0x30
[<ffffffff97260b64>] sysfs_kf_write+0x44/0x60
[<ffffffff9725feae>] kernfs_fop_write+0x10e/0x190
[<ffffffff971e13f8>] __vfs_write+0x28/0x110
[<ffffffff970b0fa4>] ? percpu_down_read+0x44/0x80
[<ffffffff971e53a7>] ? __sb_start_write+0xa7/0xe0
[<ffffffff971e53a7>] ? __sb_start_write+0xa7/0xe0
[<ffffffff971e1f04>] vfs_write+0xc4/0x180
[<ffffffff971e3089>] SyS_write+0x49/0xa0
[<ffffffff97001a46>] do_syscall_64+0xa6/0x1b0
[<ffffffff9819201e>] entry_SYSCALL64_slow_path+0x25/0x25
...
RIP [<ffffffff9758bbf5>] free_msi_irqs+0x65/0x190
RSP <ffff89ad3085bc48>
---[ end trace f4505e1dac5b95d3 ]---
Segmentation fault
Restore pcie_pme_remove().
[bhelgaas: changelog]
Fixes: d7def20400 ("PCI/PME: Make explicitly non-modular")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
CC: stable@vger.kernel.org # v4.9+
2017-02-15 09:39:32 -06:00
arch
x86/PCI: Ignore _CRS on Supermicro X8DTH-i/6/iF/6F
2017-01-11 09:11:15 -06:00
block
ktime: Cleanup ktime_set() usage
2016-12-25 17:21:22 +01:00
certs
certs: Add a secondary system keyring that can be added to dynamically
2016-04-11 22:48:09 +01:00
crypto
This pull contains one set of changes: a conversion of the crypto DocBook
2016-12-17 16:00:34 -08:00
Documentation
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2016-12-23 16:54:46 -08:00
drivers
PCI/PME: Restore pcie_pme_driver.remove
2017-02-15 09:39:32 -06:00
firmware
WHENCE: use https://linuxtv.org for LinuxTV URLs
2015-12-04 10:35:11 -02:00
fs
ktime: Get rid of ktime_equal()
2016-12-25 17:21:23 +01:00
include
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2016-12-25 14:30:04 -08:00
init
mm: add PageWaiters indicating tasks are waiting for a page bit
2016-12-25 11:54:48 -08:00
ipc
ipc/sem: avoid idr tree lookup for interrupted semop
2016-12-14 16:04:08 -08:00
kernel
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2016-12-25 14:30:04 -08:00
lib
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2016-12-25 14:30:04 -08:00
mm
mm: add PageWaiters indicating tasks are waiting for a page bit
2016-12-25 11:54:48 -08:00
net
ktime: Get rid of ktime_equal()
2016-12-25 17:21:23 +01:00
samples
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2016-12-23 16:49:12 -08:00
scripts
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
2016-12-22 10:03:52 -08:00
security
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
sound
ktime: Cleanup ktime_set() usage
2016-12-25 17:21:22 +01:00
tools
Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
2016-12-25 14:01:28 -08:00
usr
initramfs: allow again choice of the embedded initram compression algorithm
2016-12-14 16:04:08 -08:00
virt
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2016-12-25 14:30:04 -08:00
.cocciconfig
scripts: add Linux .cocciconfig for coccinelle
2016-07-22 12:13:39 +02:00
.get_maintainer.ignore
.gitattributes
.gitattributes: set git diff driver for C source code files
2016-10-07 18:46:30 -07:00
.gitignore
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
2016-08-02 16:48:52 -04:00
.mailmap
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
2016-10-15 09:26:12 -07:00
COPYING
CREDITS
CREDITS: Remove outdated address information
2016-12-21 15:21:29 -08:00
Kbuild
scripts/gdb: provide linux constants
2016-05-23 17:04:14 -07:00
Kconfig
MAINTAINERS
Watchdog updates for v4.10
2016-12-24 11:27:45 -08:00
Makefile
Linux 4.10-rc1
2016-12-25 16:13:08 -08:00
README
README: add a new README file, pointing to the Documentation/
2016-10-24 08:12:35 -02:00