linux-stable/drivers
Farhan Ali 3d5e860adf vfio-ccw: Prevent quiesce function going into an infinite loop
[ Upstream commit d1ffa760d2 ]

The quiesce function calls cio_cancel_halt_clear() and if we
get an -EBUSY we go into a loop where we:
	- wait for any interrupts
	- flush all I/O in the workqueue
	- retry cio_cancel_halt_clear

During the period where we are waiting for interrupts or
flushing all I/O, the channel subsystem could have completed
a halt/clear action and turned off the corresponding activity
control bits in the subchannel status word. This means the next
time we call cio_cancel_halt_clear(), we will again start by
calling cancel subchannel and so we can be stuck between calling
cancel and halt forever.

Rather than calling cio_cancel_halt_clear() immediately after
waiting, let's try to disable the subchannel. If we succeed in
disabling the subchannel then we know nothing else can happen
with the device.

Suggested-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
Message-Id: <4d5a4b98ab1b41ac6131b5c36de18b76c5d66898.1555449329.git.alifm@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Acked-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-05-31 06:47:35 -07:00
..
accessibility
acpi ACPI / property: fix handling of data_nodes in acpi_get_next_subnode() 2019-05-31 06:47:17 -07:00
amba
android binder: fix handling of misaligned binder object 2019-05-02 09:40:31 +02:00
ata libata: fix using DMA buffers on stack 2019-05-04 09:15:22 +02:00
atm atm: he: fix sign-extension overflow on large shift 2019-02-27 10:08:05 +01:00
auxdisplay auxdisplay: hd44780: Fix memory leak on ->remove() 2019-04-20 09:15:00 +02:00
base PM / core: Propagate dev->power.wakeup_path when no callbacks 2019-05-31 06:47:28 -07:00
bcma
block virtio-blk: limit number of hw queues by nr_cpu_ids 2019-05-10 17:53:12 +02:00
bluetooth Bluetooth: btusb: request wake pin with NOAUTOEN 2019-05-08 07:20:51 +02:00
bus
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2019-04-05 22:31:35 +02:00
char hwrng: omap - Set default quality 2019-05-31 06:47:34 -07:00
clk clk: rockchip: Make rkpwm a critical clock on rk3288 2019-05-31 06:47:28 -07:00
clocksource clocksource/drivers/oxnas: Fix OX820 compatible 2019-05-16 19:42:21 +02:00
connector
cpufreq cpufreq: kirkwood: fix possible object reference leak 2019-05-31 06:47:29 -07:00
cpuidle cpuidle: big.LITTLE: fix refcount leak 2019-02-12 19:46:03 +01:00
crypto crypto: sun4i-ss - Fix invalid calculation of hash end 2019-05-31 06:47:23 -07:00
dax
dca
devfreq
dio
dma dmaengine: tegra210-adma: use devm_clk_*() helpers 2019-05-31 06:47:33 -07:00
dma-buf
edac x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:18:42 +02:00
eisa
extcon extcon: arizona: Disable mic detect if running when driver is removed 2019-05-31 06:47:28 -07:00
firewire
firmware efi/arm/arm64: Allow SetVirtualAddressMap() to be omitted 2019-04-05 22:31:36 +02:00
fmc
fpga
fsi
gpio gpio: of: Fix of_gpiochip_add() error path 2019-05-04 09:15:22 +02:00
gpu drm: Wake up next in drm_read() chain if we are forced to putback the event 2019-05-31 06:47:35 -07:00
hid HID: logitech-hidpp: change low battery level threshold from 31 to 30 percent 2019-05-31 06:47:31 -07:00
hsi
hv Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup() 2019-05-10 17:53:08 +02:00
hwmon hwmon: (f71805f) Use request_muxed_region for Super-IO accesses 2019-05-31 06:47:27 -07:00
hwspinlock
hwtracing intel_th: msu: Fix single mode with IOMMU 2019-05-25 18:25:19 +02:00
i2c i2c: i2c-stm32f7: Fix SDADEL minimum formula 2019-05-08 07:20:53 +02:00
ide
idle x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:18:42 +02:00
iio iio: common: ssp_sensors: Initialize calculated_time in ssp_common_process_data 2019-05-31 06:47:29 -07:00
infiniband RDMA/hns: Fix bad endianess of port_pd variable 2019-05-31 06:47:31 -07:00
input Input: elan_i2c - add hardware ID for multiple Lenovo laptops 2019-05-16 19:42:30 +02:00
iommu iommu/tegra-smmu: Fix invalid ASID bits on Tegra30/114 2019-05-25 18:25:22 +02:00
ipack
irqchip MIPS: perf: ath79: Fix perfcount IRQ assignment 2019-05-16 19:42:23 +02:00
isdn mISDN: Check address length before reading address family 2019-05-16 19:42:21 +02:00
leds leds: pwm: silently error out on EPROBE_DEFER 2019-05-16 19:42:29 +02:00
lightnvm
macintosh
mailbox mailbox: bcm-flexrm-mailbox: Fix FlexRM ring flush timeout issue 2019-03-23 14:35:15 +01:00
mcb
md bcache: avoid clang -Wunintialized warning 2019-05-31 06:47:23 -07:00
media media: saa7146: avoid high stack usage with clang 2019-05-31 06:47:34 -07:00
memory memory: tegra: Fix integer overflow on tick value calculation 2019-05-25 18:25:25 +02:00
memstick memstick: Prevent memstick host from getting runtime suspended during card detection 2019-02-12 19:46:04 +01:00
message
mfd mfd: mc13xxx: Fix a missing check of a register-read failure 2019-02-27 10:08:03 +01:00
misc lkdtm: Add tests for NULL pointer dereference 2019-04-20 09:15:06 +02:00
mmc mmc: sdhci-of-esdhc: add erratum eSDHC-A001 and A-008358 support 2019-05-31 06:47:28 -07:00
mtd mtd: spi-nor: intel-spi: Avoid crossing 4K address boundary on read/write 2019-05-21 18:50:17 +02:00
mux
net cxgb3/l2t: Fix undefined behaviour 2019-05-31 06:47:31 -07:00
nfc spi: ST ST95HF NFC: declare missing of table 2019-05-16 19:42:24 +02:00
ntb
nubus
nvdimm libnvdimm/namespace: Fix label tracking error 2019-05-31 06:47:11 -07:00
nvme nvme-loop: init nvmet_ctrl fatal_err_work when allocate 2019-05-08 07:20:47 +02:00
nvmem
of
oprofile
parisc parisc: Skip registering LED when running in QEMU 2019-05-25 18:25:18 +02:00
parport parport_pc: fix find_superio io compare code, should use equal test. 2019-03-23 14:35:24 +01:00
pci PCI: Work around Pericom PCIe-to-PCI bridge Retrain Link erratum 2019-05-25 18:25:32 +02:00
pcmcia
perf
phy phy: sun4i-usb: Make sure to disable PHY0 passby for peripheral mode 2019-05-31 06:47:26 -07:00
pinctrl pinctrl: samsung: fix leaked of_node references 2019-05-31 06:47:24 -07:00
platform platform/x86: thinkpad_acpi: Disable Bluetooth for some machines 2019-05-16 19:42:19 +02:00
pnp
power power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG 2019-05-25 18:25:35 +02:00
powercap x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:18:42 +02:00
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting 2019-04-05 22:31:39 +02:00
remoteproc
reset
rpmsg
rtc rtc: xgene: fix possible race condition 2019-05-31 06:47:30 -07:00
s390 vfio-ccw: Prevent quiesce function going into an infinite loop 2019-05-31 06:47:35 -07:00
sbus
scsi scsi: lpfc: Fix SLI3 commands being issued on SLI4 devices 2019-05-31 06:47:34 -07:00
sfi
sh
sn
soc soc/tegra: pmc: Drop locking from tegra_powergate_is_powered() 2019-04-20 09:15:06 +02:00
spi spi: Fix zero length xfer bug 2019-05-31 06:47:35 -07:00
spmi
ssb ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit 2019-05-31 06:47:13 -07:00
staging staging: olpc_dcon: add a missing dependency 2019-05-16 19:42:28 +02:00
target scsi: target/iscsi: Avoid iscsit_release_commands_from_conn() deadlock 2019-03-23 14:35:20 +01:00
tc
tee
thermal x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:18:42 +02:00
thunderbolt thunderbolt: Fix to check for kmemdup failure 2019-05-31 06:47:34 -07:00
tty tty: ipwireless: fix missing checks for ioremap 2019-05-31 06:47:32 -07:00
uio Revert "uio: use request_threaded_irq instead" 2019-02-15 08:09:14 +01:00
usb usb: core: Add PM runtime calls to usb_hcd_platform_shutdown 2019-05-31 06:47:33 -07:00
uwb
vfio vfio/pci: use correct format characters 2019-05-08 07:20:49 +02:00
vhost vhost: reject zero size iova range 2019-04-27 09:35:34 +02:00
video fbdev: fix WARNING in __alloc_pages_nodemask bug 2019-05-31 06:47:13 -07:00
virt drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl 2019-05-16 19:42:35 +02:00
virtio virtio_pci: fix a NULL pointer reference in vp_del_vqs 2019-05-10 17:53:11 +02:00
vlynq
vme
w1 w1: fix the resume command API 2019-05-31 06:47:21 -07:00
watchdog watchdog: renesas_wdt: don't set divider while watchdog is running 2019-02-12 19:46:03 +01:00
xen xen/pvcalls: remove set but not used variable 'intf' 2019-02-27 10:08:03 +01:00
zorro
Kconfig
Makefile