linux-stable/drivers
Saurabh Sengar b692c238dd scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq
commit d957e7ffb2 upstream.

storvsc_error_wq workqueue should not be marked as WQ_MEM_RECLAIM as it
doesn't need to make forward progress under memory pressure.  Marking this
workqueue as WQ_MEM_RECLAIM may cause deadlock while flushing a
non-WQ_MEM_RECLAIM workqueue.  In the current state it causes the following
warning:

[   14.506347] ------------[ cut here ]------------
[   14.506354] workqueue: WQ_MEM_RECLAIM storvsc_error_wq_0:storvsc_remove_lun is flushing !WQ_MEM_RECLAIM events_freezable_power_:disk_events_workfn
[   14.506360] WARNING: CPU: 0 PID: 8 at <-snip->kernel/workqueue.c:2623 check_flush_dependency+0xb5/0x130
[   14.506390] CPU: 0 PID: 8 Comm: kworker/u4:0 Not tainted 5.4.0-1086-azure #91~18.04.1-Ubuntu
[   14.506391] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 05/09/2022
[   14.506393] Workqueue: storvsc_error_wq_0 storvsc_remove_lun
[   14.506395] RIP: 0010:check_flush_dependency+0xb5/0x130
		<-snip->
[   14.506408] Call Trace:
[   14.506412]  __flush_work+0xf1/0x1c0
[   14.506414]  __cancel_work_timer+0x12f/0x1b0
[   14.506417]  ? kernfs_put+0xf0/0x190
[   14.506418]  cancel_delayed_work_sync+0x13/0x20
[   14.506420]  disk_block_events+0x78/0x80
[   14.506421]  del_gendisk+0x3d/0x2f0
[   14.506423]  sr_remove+0x28/0x70
[   14.506427]  device_release_driver_internal+0xef/0x1c0
[   14.506428]  device_release_driver+0x12/0x20
[   14.506429]  bus_remove_device+0xe1/0x150
[   14.506431]  device_del+0x167/0x380
[   14.506432]  __scsi_remove_device+0x11d/0x150
[   14.506433]  scsi_remove_device+0x26/0x40
[   14.506434]  storvsc_remove_lun+0x40/0x60
[   14.506436]  process_one_work+0x209/0x400
[   14.506437]  worker_thread+0x34/0x400
[   14.506439]  kthread+0x121/0x140
[   14.506440]  ? process_one_work+0x400/0x400
[   14.506441]  ? kthread_park+0x90/0x90
[   14.506443]  ret_from_fork+0x35/0x40
[   14.506445] ---[ end trace 2d9633159fdc6ee7 ]---

Link: https://lore.kernel.org/r/1659628534-17539-1-git-send-email-ssengar@linux.microsoft.com
Fixes: 436ad94133 ("scsi: storvsc: Allow only one remove lun work item to be issued per lun")
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-05 10:26:32 +02:00
..
accessibility
acpi ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool 2022-08-25 11:15:38 +02:00
amba
android binder: fix async_free_space accounting for empty parcels 2022-01-05 12:34:59 +01:00
ata ata: libata-eh: Add missing command name 2022-08-25 11:15:34 +02:00
atm atm: idt77252: fix use-after-free bugs caused by tst_timer 2022-08-25 11:15:39 +02:00
auxdisplay auxdisplay: ht16k33: Fix frame buffer device blanking 2021-11-26 11:36:15 +01:00
base x86/speculation/mmio: Add sysfs reporting for Processor MMIO Stale Data 2022-06-16 13:18:52 +02:00
bcma
block loop: Check for overflow while configuring loop 2022-09-05 10:26:31 +02:00
bluetooth Bluetooth: hci_intel: Add check for platform_driver_register 2022-08-25 11:15:11 +02:00
bus bus: hisi_lpc: fix missing platform_device_put() in hisi_lpc_acpi_probe() 2022-08-25 11:15:02 +02:00
cdrom
char Revert "Revert "char/random: silence a lockdep splat with printk()"" 2022-07-29 17:10:34 +02:00
clk clk: qcom: ipq8074: dont disable gcc_sleep_clk_src 2022-08-25 11:15:43 +02:00
clocksource clocksource/drivers/sp804: Avoid error on multiple instances 2022-06-14 16:59:37 +02:00
connector
cpufreq cpufreq: pmac32-cpufreq: Fix refcount leak bug 2022-07-21 21:09:30 +02:00
cpuidle cpuidle: Fix kobject memory leaks in error paths 2021-11-26 11:36:08 +01:00
crypto crypto: hisilicon - Kunpeng916 crypto driver don't sleep when in softirq 2022-08-25 11:15:07 +02:00
dax
dca
devfreq PM / devfreq: rk3399_dmc: Disable edev on remove() 2022-06-14 16:59:17 +02:00
dio
dma dmaengine: sprd: Cleanup in .remove() after pm_runtime_get_sync() failed 2022-08-25 11:15:44 +02:00
dma-buf
edac EDAC: Fix calculation of returned address and next offset in edac_align_ptr() 2022-02-23 11:58:40 +01:00
eisa
extcon extcon: Modify extcon device to be created after driver data is set 2022-06-14 16:59:37 +02:00
firewire firewire: core: extend card->lock in fw_core_handle_bus_reset 2022-05-12 12:20:24 +02:00
firmware firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails 2022-08-25 11:15:33 +02:00
fmc
fpga fpga: altera-pr-ip: fix unsigned comparison with less than zero 2022-08-25 11:15:14 +02:00
fsi
gnss
gpio gpio: gpiolib-of: Fix refcount bugs in of_mm_gpiochip_add_data() 2022-08-25 11:15:17 +02:00
gpu drm/meson: Fix refcount bugs in meson_vpu_has_available_connectors() 2022-08-25 11:15:42 +02:00
hid HID: alps: Declare U1_UNICORN_LEGACY support 2022-08-25 11:15:18 +02:00
hsi HSI: core: Fix return freed object in hsi_new_client 2022-01-27 09:04:24 +01:00
hv random: remove unused irq_flags argument from add_interrupt_randomness() 2022-06-25 11:49:01 +02:00
hwmon hwmon: (ibmaem) don't call platform_device_del() if platform_device_add() fails 2022-07-07 17:35:11 +02:00
hwspinlock
hwtracing intel_th: pci: Add Meteor Lake-P support 2022-08-25 11:15:30 +02:00
i2c i2c: mux-gpmux: Add of_node_put() when breaking out of loop 2022-08-25 11:15:11 +02:00
ide
idle
iio iio: light: isl29028: Fix the warning in isl29028_remove() 2022-08-25 11:14:55 +02:00
infiniband RDMA/rxe: Fix error unwind in rxe_create_qp() 2022-08-25 11:15:19 +02:00
input Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag 2022-06-14 16:59:39 +02:00
iommu iommu/arm-smmu: qcom_iommu: Add of_node_put() when breaking out of loop 2022-08-25 11:15:23 +02:00
ipack
irqchip irqchip/tegra: Fix overflow implicit truncation warnings 2022-08-25 11:15:43 +02:00
isdn mISDN: change function names to avoid conflicts 2022-01-11 13:58:50 +01:00
leds
lightnvm lightnvm: disable the subsystem 2022-05-01 17:00:38 +02:00
macintosh macintosh/adb: fix oob read in do_adb_query() function 2022-08-11 12:48:41 +02:00
mailbox mailbox: forward the hrtimer if not queued and under a lock 2022-06-14 16:59:25 +02:00
mcb
md md: call __md_stop_writes in md_stop 2022-09-05 10:26:32 +02:00
media media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignment 2022-08-25 11:15:07 +02:00
memory memory: atmel-ebi: Fix missing of_node_put in atmel_ebi_probe 2022-04-20 09:12:48 +02:00
memstick memstick/ms_block: Fix a memory leak 2022-08-25 11:15:16 +02:00
message
mfd mfd: t7l66xb: Drop platform disable callback 2022-08-25 11:15:23 +02:00
misc cxl: Fix a memory leak in an error handling path 2022-08-25 11:15:44 +02:00
mmc mmc: pxamci: Fix an error handling path in pxamci_probe() 2022-08-25 11:15:34 +02:00
mtd mtd: st_spi_fsm: Add a clk_disable_unprepare() in .probe()'s error path 2022-08-25 11:15:14 +02:00
mux
net ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter 2022-09-05 10:26:31 +02:00
nfc NFC: nxp-nci: don't print header length mismatch on i2c error 2022-07-21 21:09:30 +02:00
ntb NTB: ntb_tool: uninitialized heap data in tool_fn_write() 2022-08-25 11:15:39 +02:00
nubus
nvdimm nvdimm: Fix badblocks clear off-by-one error 2022-07-07 17:35:09 +02:00
nvme nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags 2022-06-14 16:59:17 +02:00
nvmem
of fdt: Update CRC check for rng-seed 2022-07-02 16:27:39 +02:00
opp
oprofile
parisc parisc: Fix CPU affinity for Lasi, WAX and Dino chips 2022-04-15 14:15:04 +02:00
parport
pci PCI: Add ACS quirk for Broadcom BCM5750x NICs 2022-08-25 11:15:42 +02:00
pcmcia pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards 2022-06-14 16:59:31 +02:00
perf arm_pmu: Validate single/group leader events 2022-04-27 13:39:45 +02:00
phy phy: qcom-qmp: fix reset-controller leak on probe errors 2022-06-14 16:59:30 +02:00
pinctrl pinctrl: amd: Don't save/restore interrupt status and wake status bits 2022-09-05 10:26:28 +02:00
platform platform/olpc: Fix uninitialized data in debugfs write 2022-08-25 11:15:18 +02:00
pnp
power power/reset: arm-versatile: Fix refcount leak in versatile_reboot_probe 2022-07-29 17:10:31 +02:00
powercap
pps
ps3
ptp ptp: replace snprintf with sysfs_emit 2022-04-15 14:15:00 +02:00
pwm pwm: lp3943: Fix duty calculation in case period was clamped 2022-06-14 16:59:31 +02:00
rapidio
ras
regulator regulator: of: Fix refcount leak bug in of_get_regulation_constraints() 2022-08-25 11:15:02 +02:00
remoteproc remoteproc: qcom: wcnss: Fix handling of IRQs 2022-08-25 11:15:21 +02:00
reset reset: tegra-bpmp: Restore Handle errors in BPMP response 2022-04-27 13:39:43 +02:00
rpmsg rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge 2022-08-25 11:15:23 +02:00
rtc rtc: mt6397: check return value after calling platform_get_resource() 2022-06-14 16:59:32 +02:00
s390 scsi: zfcp: Fix missing auto port scan and thus missing target ports 2022-08-25 11:15:27 +02:00
sbus
scsi scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq 2022-09-05 10:26:32 +02:00
sfi
sh maple: fix wrong return value of maple_bus_init(). 2021-11-26 11:36:21 +01:00
siox
slimbus slimbus: qcom: Fix IRQ check in qcom_slim_probe 2022-05-18 09:42:49 +02:00
sn
soc soc: fsl: guts: machine variable might be unset 2022-08-25 11:15:01 +02:00
soundwire soundwire: bus_type: fix remove and shutdown support 2022-08-25 11:15:15 +02:00
spi spi: img-spfi: Fix pm_runtime_get_sync() error checking 2022-06-14 16:59:20 +02:00
spmi
ssb
staging staging: rtl8192u: Fix sleep in atomic context bug in dm_fsync_timer_callback 2022-08-25 11:15:15 +02:00
target scsi: target: tcmu: Fix possible page UAF 2022-04-20 09:12:49 +02:00
tc
tee tee: add overflow check in register_shm_helper() 2022-08-25 11:15:48 +02:00
thermal thermal: sysfs: Fix cooling_device_stats_setup() error code path 2022-08-25 11:14:53 +02:00
thunderbolt
tty tty: serial: Fix refcount leak bug in ucc_uart.c 2022-08-25 11:15:45 +02:00
uio
usb gadgetfs: ep_io - wait until IRQ finishes 2022-08-25 11:15:44 +02:00
uwb
vfio vfio: Clear the caps->buf to NULL after free 2022-08-25 11:15:45 +02:00
vhost vringh: Fix loop descriptors check in the indirect cases 2022-06-14 16:59:38 +02:00
video video: fbdev: i740fb: Check the argument of i740_calc_vclk() 2022-08-25 11:15:47 +02:00
virt vboxguest: Do not use devm for irq 2022-08-25 11:15:43 +02:00
virtio virtio_mmio: Restore guest page size on resume 2022-07-21 21:09:30 +02:00
visorbus
vlynq
vme
w1 w1: w1_therm: fixes w1_seq for ds28ea00 sensors 2022-04-15 14:15:03 +02:00
watchdog ar7: fix kernel builds for compiler test 2021-11-26 11:36:15 +01:00
xen xen/xenbus: fix return type in xenbus_file_read() 2022-08-25 11:15:39 +02:00
zorro
Kconfig
Makefile