linux/drivers
Julian Wiedmann f9e50b02a9 s390/qeth: fix dangling IO buffers after halt/clear
The cio layer's intparm logic does not align itself well with how qeth
manages cmd IOs. When an active IO gets terminated via halt/clear, the
corresponding IRQ's intparm does not reflect the cmd buffer but rather
the intparm that was passed to ccw_device_halt() / ccw_device_clear().
This behaviour was recently clarified in
commit b91d9e67e5 ("s390/cio: fix intparm documentation").

As a result, qeth_irq() currently doesn't cancel a cmd that was
terminated via halt/clear. This primarily causes us to leak
card->read_cmd after the qeth device is removed, since our IO path still
holds a refcount for this cmd.

For qeth this means that we need to keep track of which IO is pending on
a device ('active_cmd'), and use this as the intparm when calling
halt/clear. Otherwise qeth_irq() can't match the subsequent IRQ to its
cmd buffer.
Since we now keep track of the _expected_ intparm, we can also detect
any mismatch; this would constitute a bug somewhere in the lower layers.
In this case cancel the active cmd - we effectively "lost" the IRQ and
should not expect any further notification for this IO.

Fixes: 405548959c ("s390/qeth: add support for dynamically allocated cmds")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-12-05 12:25:05 -08:00
..
accessibility treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 70 2019-05-24 17:36:47 +02:00
acpi libnvdimm for 5.5 2019-12-01 18:43:25 -08:00
amba ARM updates for 5.4-rc: 2019-10-23 06:26:33 -04:00
android compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
ata This is the bulk of GPIO changes for the v5.5 kernel cycle 2019-12-01 17:56:50 -08:00
atm atm: remove unneeded semicolon 2019-10-28 16:47:22 -07:00
auxdisplay It's a somewhat calmer cycle for docs this time, as the churn of the mass 2019-09-17 16:22:26 -07:00
base drivers/base/memory.c: drop the mem_sysfs_mutex 2019-12-01 12:59:04 -08:00
bcma bcma: fix block comment style 2019-10-24 08:45:31 +03:00
block for-linus-20191129 2019-12-01 18:26:56 -08:00
bluetooth Bluetooth: btbcm: Use the BDADDR_PROPERTY quirk 2019-11-22 13:35:20 +01:00
bus Staging / IIO patches for 5.5-rc1 2019-11-27 10:57:52 -08:00
cdrom cdrom: respect device capabilities during opening action 2019-11-26 13:02:24 -07:00
char compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
clk This merge window we have one small clk provider API in the core framework and 2019-12-01 16:06:02 -08:00
clocksource First set of RISC-V updates for v5.5-rc1 2019-11-27 11:27:59 -08:00
connector connector: remove redundant input callback from cn_dev 2019-07-21 13:31:14 -07:00
counter counter: Simplify the count_read and count_write callbacks 2019-10-18 19:47:27 +01:00
cpufreq Power management updates for 5.5-rc1 2019-11-26 19:06:44 -08:00
cpuidle cpuidle: Pass exit latency limit to cpuidle_use_deepest_state() 2019-11-20 11:46:18 +01:00
crypto compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
dax libnvdimm for 5.5 2019-12-01 18:43:25 -08:00
dca treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 33 2019-05-24 17:27:11 +02:00
devfreq PM / devfreq: tegra30: Tune up MCCPU boost-down coefficient 2019-11-06 12:04:01 +09:00
dio treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
dma dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle 2019-10-23 21:15:21 +05:30
dma-buf compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
edac EDAC/altera: Use the Altera System Manager driver 2019-11-22 10:18:29 +01:00
eisa treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 210 2019-05-30 11:29:53 -07:00
extcon Char/Misc driver patches for 5.5-rc1 2019-11-27 10:53:50 -08:00
firewire compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
firmware Char/Misc driver patches for 5.5-rc1 2019-11-27 10:53:50 -08:00
fpga fpga: dfl: fme: add power management support 2019-10-16 19:18:27 -07:00
fsi fsi: aspeed: Fix OPB0 byte order register values 2019-11-08 11:28:21 +01:00
gnss treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
gpio This is the bulk of GPIO changes for the v5.5 kernel cycle 2019-12-01 17:56:50 -08:00
gpu This is the bulk of GPIO changes for the v5.5 kernel cycle 2019-12-01 17:56:50 -08:00
greybus greybus: remove excessive check in gb_connection_hd_cport_quiesce() 2019-10-10 15:24:19 +02:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2019-12-01 18:20:54 -08:00
hsi HSI changes for the 5.4 series 2019-09-22 12:02:21 -07:00
hv Merge branch 'akpm' (patches from Andrew) 2019-12-01 20:36:41 -08:00
hwmon compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
hwspinlock hwspinlock: u8500_hsem: Remove redundant PM runtime implementation 2019-11-08 16:42:26 -08:00
hwtracing compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
i2c Merge branch 'i2c/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-12-01 18:29:36 -08:00
i3c i3c: Spelling s/dicovered/discovered/ 2019-10-31 11:24:52 +01:00
ide compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
idle x86/intel: Aggregate microserver naming 2019-08-28 11:29:32 +02:00
iio compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
infiniband net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup 2019-12-04 12:27:13 -08:00
input Merge branch 'next' into for-linus 2019-11-25 13:26:56 -08:00
interconnect Merge 5.4-rc7 into char-misc-next 2019-11-11 06:24:30 +01:00
iommu - Support for new VMBus protocols (Andrea Parri). 2019-11-30 14:50:51 -08:00
ipack TTY / Serial driver updates for 5.3-rc1 2019-07-11 15:38:21 -07:00
irqchip First set of RISC-V updates for v5.5-rc1 2019-11-27 11:27:59 -08:00
isdn compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
leds Merge tag 'leds-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds 2019-12-01 16:09:28 -08:00
lightnvm lightnvm: print error when target is not found 2019-09-05 13:17:01 -06:00
macintosh powerpc updates for 5.5 2019-11-30 14:35:43 -08:00
mailbox mailbox changes for v5.5 2019-12-01 18:42:02 -08:00
mcb drivers: mcb: use symbol namespaces 2019-11-03 19:54:53 +01:00
md - Fix DM core to disallow stacking request-based DM on partitions. 2019-11-25 11:53:26 -08:00
media compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
memory iommu/mediatek: Clean up struct mtk_smi_iommu 2019-08-30 15:57:27 +02:00
memstick memstick: Fix Kconfig indentation 2019-11-21 12:25:59 +01:00
message SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
mfd - Core Frameworks 2019-12-01 16:16:31 -08:00
misc Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-12-01 19:05:07 -08:00
mmc Driver core patches for 5.5-rc1 2019-11-27 11:06:20 -08:00
mtd compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
mux drivers: Introduce device lookup variants by of_node 2019-07-30 13:07:41 +02:00
net net: thunderx: start phy before starting autonegotiation 2019-12-05 12:10:40 -08:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-22 16:27:24 -08:00
ntb ntb: ntb_pingpong: no need to check the return value of debugfs calls 2019-10-16 06:07:22 -07:00
nubus nubus: Remove cast to void pointer 2019-10-21 09:08:15 +02:00
nvdimm libnvdimm for 5.5 2019-12-01 18:43:25 -08:00
nvme compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
nvmem Char/Misc driver patches for 5.5-rc1 2019-11-27 10:53:50 -08:00
of dma-mapping updates for 5.5-rc1 2019-11-28 11:16:43 -08:00
opp PM / OPP: Support adjusting OPP voltages at runtime 2019-11-11 10:27:15 +05:30
oprofile Printk changes for 5.5 2019-11-25 19:40:40 -08:00
parisc parisc: Remove 32-bit DMA enforcement from sba_iommu 2019-10-14 21:44:26 +02:00
parport parport: daisy: use new parport device model 2019-11-13 19:09:49 +08:00
pci compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
pcmcia pcmcia: remove unused dprintk definition 2019-11-22 07:03:45 +01:00
perf drivers/perf: hisi: update the sccl_id/ccl_id for certain HiSilicon platform 2019-11-07 13:07:55 +00:00
phy Char/Misc driver patches for 5.5-rc1 2019-11-27 10:53:50 -08:00
pinctrl pinctrl: Fix warning by adding missing MODULE_LICENSE 2019-11-28 09:12:43 +01:00
platform platform-drivers-x86 for v5.5-1 2019-12-01 18:24:25 -08:00
pnp docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
power - Core Frameworks 2019-12-01 16:16:31 -08:00
powercap powercap/intel_rapl: add support for Cometlake desktop 2019-11-04 12:31:25 +01:00
pps drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl 2019-07-16 19:23:24 -07:00
ps3 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
ptp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
pwm Merge 5.4-rc7 into staging-next 2019-11-11 06:23:37 +01:00
rapidio Merge branch 'akpm' (patches from Andrew) 2019-07-17 08:58:04 -07:00
ras RAS: Build debugfs.o only when enabled in Kconfig 2019-08-08 17:44:02 +02:00
regulator Merge branch 'regulator-5.5' into regulator-next 2019-11-22 19:56:20 +00:00
remoteproc remoteproc: stm32: fix probe error case 2019-11-18 20:35:16 -08:00
reset reset: fix of_reset_control_get_count kerneldoc comment 2019-10-24 10:26:33 +02:00
rpmsg rpmsg updates for v5.5 2019-12-01 18:39:24 -08:00
rtc - Core Frameworks 2019-12-01 16:16:31 -08:00
s390 s390/qeth: fix dangling IO buffers after halt/clear 2019-12-05 12:25:05 -08:00
sbus compat_ioctl: move more drivers to compat_ptr_ioctl 2019-10-23 17:23:44 +02:00
scsi for-linus-20191129 2019-12-01 18:26:56 -08:00
sfi treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
sh sh/intc: Use pr_warn instead of pr_warning 2019-10-18 15:01:55 +02:00
siox treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
slimbus slimbus: fix slim_tid_txn() 2019-08-18 12:56:10 +02:00
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
soundwire Merge 5.4-rc7 into char-misc-next 2019-11-11 06:24:30 +01:00
spi Merge branch 'spi-5.5' into spi-next 2019-11-22 19:56:35 +00:00
spmi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
ssb ssb: make array pwr_info_offset static const, makes object smaller 2019-09-13 17:23:18 +03:00
staging compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
target SCSI fixes on 20191101 2019-11-07 06:43:18 -07:00
tc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
tee compat_ioctl: move more drivers to compat_ptr_ioctl 2019-10-23 17:23:44 +02:00
thermal platform-drivers-x86 for v5.5-1 2019-12-01 18:24:25 -08:00
thunderbolt thunderbolt: Power cycle the router if NVM authentication fails 2019-11-19 17:35:57 +01:00
tty compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
uio uio: fix irq init with dt support & irq not defined 2019-11-14 11:49:48 +08:00
usb compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
vfio compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
vhost compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
video Merge branch 'i2c/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-12-01 18:29:36 -08:00
virt compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
virtio virtio_balloon: fix shrinker count 2019-11-20 02:15:57 -05:00
visorbus bus_find_device: Unify the match callback with class_find_device 2019-06-24 05:22:31 +02:00
vlynq treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102 2019-05-24 17:39:00 +02:00
vme treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
w1 w1: new driver. DS2430 chip 2019-11-14 13:06:33 +08:00
watchdog linux-watchdog 5.5-rc1 tag 2019-12-01 18:01:03 -08:00
xen mm/memory_hotplug.c: remove __online_page_set_limits() 2019-12-01 12:59:10 -08:00
zorro treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig Staging/IIO driver patches for 5.4-rc1 2019-09-18 11:05:34 -07:00
Makefile Staging/IIO driver patches for 5.4-rc1 2019-09-18 11:05:34 -07:00