Miquel Raynal
e50db95d6e
platform-msi: Free descriptors in platform_msi_domain_free()
...
commit 81b1e6e6a8590a19257e37a1633bec098d499c57 upstream.
Since the addition of platform MSI support, there were two helpers
supposed to allocate/free IRQs for a device:
platform_msi_domain_alloc_irqs()
platform_msi_domain_free_irqs()
In these helpers, IRQ descriptors are allocated in the "alloc" routine
while they are freed in the "free" one.
Later, two other helpers have been added to handle IRQ domains on top
of MSI domains:
platform_msi_domain_alloc()
platform_msi_domain_free()
Seen from the outside, the logic is pretty close with the former
helpers and people used it with the same logic as before: a
platform_msi_domain_alloc() call should be balanced with a
platform_msi_domain_free() call. While this is probably what was
intended to do, the platform_msi_domain_free() does not remove/free
the IRQ descriptor(s) created/inserted in
platform_msi_domain_alloc().
One effect of such situation is that removing a module that requested
an IRQ will let one orphaned IRQ descriptor (with an allocated MSI
entry) in the device descriptors list. Next time the module will be
inserted back, one will observe that the allocation will happen twice
in the MSI domain, one time for the remaining descriptor, one time for
the new one. It also has the side effect to quickly overshoot the
maximum number of allocated MSI and then prevent any module requesting
an interrupt in the same domain to be inserted anymore.
This situation has been met with loops of insertion/removal of the
mvpp2.ko module (requesting 15 MSIs each time).
Fixes: 552c494a76 ("platform-msi: Allow creation of a MSI-based stacked irq domain")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-09 16:16:43 +01:00
..
accessibility
acpi
ACPI / platform: Add SMB0001 HID to forbidden_id_list
2018-11-27 16:09:41 +01:00
amba
ARM: amba: Don't read past the end of sysfs "driver_override" buffer
2018-05-01 15:13:08 -07:00
android
binder: fix proc->files use-after-free
2018-12-08 13:05:07 +01:00
ata
libata: whitelist all SAMSUNG MZ7KM* solid-state disks
2018-12-21 14:11:37 +01:00
atm
atm: zatm: Fix potential Spectre v1
2018-07-22 14:27:36 +02:00
auxdisplay
base
platform-msi: Free descriptors in platform_msi_domain_free()
2019-01-09 16:16:43 +01:00
bcma
block
floppy: fix race condition in __floppy_read_block_0()
2018-12-01 09:44:20 +01:00
bluetooth
Revert "Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV"
2018-11-27 16:09:40 +01:00
bus
bus: arm-cci: remove unnecessary unreachable()
2018-12-05 19:42:41 +01:00
cdrom
cdrom: fix improper type cast, which can leat to information leak.
2018-11-21 09:25:57 +01:00
char
tpm: Restore functionality to xen vtpm driver.
2018-11-13 11:16:54 -08:00
clk
clk: mmp: Off by one in mmp_clk_add()
2018-12-21 14:11:37 +01:00
clocksource
clockevents/drivers/i8253: Add support for PIT shutdown quirk
2018-11-21 09:26:01 +01:00
connector
cpufreq
cpufreq: imx6q: add return value check for voltage scale
2018-12-01 09:44:20 +01:00
cpuidle
cpuidle: powernv: Fix promotion from snooze if next state disabled
2018-07-03 11:23:08 +02:00
crypto
crypto: caam - fix implicit casts in endianness helpers
2018-11-13 11:16:53 -08:00
dax
device-dax: implement ->split() to catch invalid munmap attempts
2018-02-28 10:18:33 +01:00
dca
devfreq
PM / devfreq: Fix potential NULL pointer dereference in governor_store
2018-04-13 19:48:09 +02:00
dio
dma
dmaengine: cppi41: delete channel from pending list when stop channel
2018-12-13 09:20:29 +01:00
dma-buf
dma-buf: remove redundant initialization of sg_table
2018-06-06 16:44:33 +02:00
edac
EDAC, skx_edac: Fix logical channel intermediate decoding
2018-11-13 11:16:56 -08:00
eisa
extcon
firewire
firewire-ohci: work around oversized DMA reads on JMicron controllers
2018-05-30 07:50:18 +02:00
firmware
efi/libstub: Make file I/O chunking x86-specific
2018-12-05 19:42:42 +01:00
fmc
fpga
gpio
gpio: max7301: fix driver for use with CONFIG_VMAP_STACK
2018-12-29 13:40:15 +01:00
gpu
drm/ioctl: Fix Spectre v1 vulnerabilities
2018-12-29 13:40:16 +01:00
hid
HID: input: Ignore battery reported by Symbol DS4308
2018-12-13 09:20:25 +01:00
hsi
HSI: ssi_protocol: double free in ssip_pn_xmit()
2018-03-24 11:00:12 +01:00
hv
Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels
2018-12-29 13:40:15 +01:00
hwmon
hwmon: (w83795) temp4_type has writable permission
2018-12-17 09:38:32 +01:00
hwspinlock
hwtracing
coresight: etb10: Fix handling of perf mode
2018-11-13 11:16:53 -08:00
i2c
i2c: scmi: Fix probe error on devices with an empty SMB0001 ACPI device node
2018-12-21 14:11:39 +01:00
ide
ide: pmac: add of_node_put()
2018-12-21 14:11:37 +01:00
idle
idle: i7300: add PCI dependency
2018-02-25 11:05:55 +01:00
iio
iio:st_magn: Fix enable device after trigger
2018-12-05 19:42:41 +01:00
infiniband
ib_srpt: Fix a use-after-free in __srpt_close_all_ch()
2018-12-29 13:40:14 +01:00
input
Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G
2019-01-09 16:16:43 +01:00
iommu
iommu/vt-d: Use memunmap to free memremap
2018-12-13 09:20:26 +01:00
ipack
irqchip
irqchip/bcm7038-l1: Hide cpu offline callback when building for !SMP
2018-09-15 09:42:58 +02:00
isdn
isdn: fix kernel-infoleak in capi_unlocked_ioctl
2019-01-09 16:16:40 +01:00
leds
leds: pca955x: Correct I2C Functionality
2018-04-13 19:48:03 +02:00
lguest
lightnvm
macintosh
macintosh/rack-meter: Convert cputime64_t use to u64
2018-10-20 09:51:32 +02:00
mailbox
mailbox: xgene-slimpro: Fix potential NULL pointer dereference
2018-09-09 20:01:19 +02:00
mcb
md
MD: fix invalid stored role for a disk - try2
2018-11-13 11:17:05 -08:00
media
media: omap3isp: Unregister media device as first
2018-12-13 09:20:25 +01:00
memory
memory: tegra: Apply interrupts mask per SoC
2018-08-03 07:55:24 +02:00
memstick
message
scsi: mptfusion: Add bounds check in mptctl_hp_targetinfo()
2018-05-25 16:13:06 +02:00
mfd
mfd: omap-usb-host: Fix dts probe of children
2018-10-18 09:13:20 +02:00
misc
misc: mic/scif: fix copy-paste error in scif_create_remote_lookup
2018-12-05 19:42:41 +01:00
mmc
mmc: omap_hsmmc: fix DMA API warning
2018-12-29 13:40:15 +01:00
mtd
mtd: atmel-quadspi: disallow building on ebsa110
2019-01-09 16:16:42 +01:00
net
qmi_wwan: apply SET_DTR quirk to the SIMCOM shared device ID
2019-01-09 16:16:43 +01:00
nfc
NFC: nxp-nci: Include unaligned.h instead of access_ok.h
2019-01-09 16:16:39 +01:00
ntb
ntb_transport: Fix bug with max_mw_size parameter
2018-05-30 07:50:22 +02:00
nubus
nvdimm
libnvdimm: Hold reference on parent while scheduling async init
2018-11-13 11:16:55 -08:00
nvme
nvmet-rdma: fix response use after free
2018-12-21 14:11:39 +01:00
nvmem
nvmem: properly handle returned value nvmem_reg_read
2018-08-03 07:55:22 +02:00
of
of: add helper to lookup compatible child node
2018-12-01 09:44:21 +01:00
oprofile
parisc
parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode
2018-05-30 07:50:43 +02:00
parport
parport: sunbpp: fix error return code
2018-09-26 08:36:38 +02:00
pci
PCI: Add Device IDs for Intel GPU "spurious interrupt" quirk
2018-11-13 11:16:56 -08:00
pcmcia
pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges
2018-11-13 11:16:46 -08:00
perf
drivers/perf: arm_pmu: handle no platform_device
2018-03-22 09:17:51 +01:00
phy
pinctrl
pinctrl: sunxi: a83t: Fix IRQ offset typo for PH11
2018-12-21 14:11:30 +01:00
platform
platform/x86: acerhdf: Add BIOS entry for Gateway LT31 v1.3307
2018-11-27 16:09:38 +01:00
pnp
power
power: remove possible deadlock when unregistering power_supply
2018-10-03 17:01:43 -07:00
powercap
PowerCap: Fix an error code in powercap_register_zone()
2018-04-13 19:47:56 +02:00
pps
ps3
ptp
ptp: fix Spectre v1 vulnerability
2018-11-10 07:43:00 -08:00
pwm
pwm: tiehrpwm: Fix disabling of output of PWMs
2018-09-09 20:01:25 +02:00
rapidio
ras
regulator
regulator: fix crash caused by null driver data
2018-10-03 17:01:49 -07:00
remoteproc
reset
reset: make device_reset_optional() really optional
2018-12-08 13:05:08 +01:00
rpmsg
rpmsg: smd: fix memory leak on channel create
2018-11-13 11:17:03 -08:00
rtc
rtc: snvs: Add timeouts to avoid kernel lockups
2018-12-21 14:11:40 +01:00
s390
virtio/s390: fix race in ccw_io_helper()
2018-12-13 09:20:28 +01:00
sbus
drivers/sbus/char: add of_node_put()
2018-12-21 14:11:36 +01:00
scsi
scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload
2018-12-21 14:11:35 +01:00
sfi
sh
sn
soc
soc/tegra: pmc: Fix child-node lookup
2018-11-13 11:17:04 -08:00
spi
spi: rspi: Fix interrupted DMA transfers
2018-10-03 17:01:49 -07:00
spmi
ssb
staging
staging: wilc1000: fix missing read_write setting when reading data
2019-01-09 16:16:43 +01:00
target
scsi: iscsi: target: Don't use stack buffer for scatterlist
2018-10-18 09:13:20 +02:00
tc
TC: Set DMA masks for devices
2018-11-13 11:17:02 -08:00
thermal
thermal: of-thermal: disable passive polling when thermal zone is disabled
2018-10-03 17:01:51 -07:00
thunderbolt
thunderbolt: Resume control channel after hibernation image is created
2018-04-24 09:34:12 +02:00
tty
drivers/tty: add missing of_node_put()
2018-12-21 14:11:36 +01:00
uio
uio: Fix an Oops on load
2018-11-27 16:09:41 +01:00
usb
usb: r8a66597: Fix a possible concurrency use-after-free bug in r8a66597_endpoint_disable()
2019-01-09 16:16:43 +01:00
uwb
uwb: hwa-rc: fix memory leak at probe
2018-10-03 17:01:42 -07:00
vfio
vfio: platform: Fix reset module leak in error path
2018-08-03 07:55:13 +02:00
vhost
vhost: make sure used idx is seen before log in vhost_add_used_n()
2019-01-09 16:16:41 +01:00
video
mach64: fix image corruption due to reading accelerator registers
2018-11-21 09:26:00 +01:00
virt
virtio
virtio: pci-legacy: Validate queue pfn
2018-09-15 09:42:57 +02:00
vlynq
vme
w1
w1: omap-hdq: fix missing bus unregister at removal
2018-11-13 11:17:01 -08:00
watchdog
watchdog: sbsa: use 32-bit read for WCV
2018-05-30 07:50:34 +02:00
xen
xen: xlate_mmu: add missing header to fix 'W=1' warning
2018-12-17 09:38:34 +01:00
zorro
zorro: Set up z->dev.dma_mask for the DMA API
2018-05-30 07:50:44 +02:00
Kconfig
Makefile
usb: build drivers/usb/common/ when USB_SUPPORT is set
2018-02-25 11:05:45 +01:00