WSL2-Linux-Kernel/drivers
Dmitry Bogdanov a9849b67b4 scsi: target: core: Add TMF to tmr_list handling
[ Upstream commit 83ab68168a3d990d5ff39ab030ad5754cbbccb25 ]

An abort that is responded to by iSCSI itself is added to tmr_list but does
not go to target core. A LUN_RESET that goes through tmr_list takes a
refcounter on the abort and waits for completion. However, the abort will
be never complete because it was not started in target core.

 Unable to locate ITT: 0x05000000 on CID: 0
 Unable to locate RefTaskTag: 0x05000000 on CID: 0.
 wait_for_tasks: Stopping tmf LUN_RESET with tag 0x0 ref_task_tag 0x0 i_state 34 t_state ISTATE_PROCESSING refcnt 2 transport_state active,stop,fabric_stop
 wait for tasks: tmf LUN_RESET with tag 0x0 ref_task_tag 0x0 i_state 34 t_state ISTATE_PROCESSING refcnt 2 transport_state active,stop,fabric_stop
...
 INFO: task kworker/0:2:49 blocked for more than 491 seconds.
 task:kworker/0:2     state:D stack:    0 pid:   49 ppid:     2 flags:0x00000800
 Workqueue: events target_tmr_work [target_core_mod]
Call Trace:
 __switch_to+0x2c4/0x470
 _schedule+0x314/0x1730
 schedule+0x64/0x130
 schedule_timeout+0x168/0x430
 wait_for_completion+0x140/0x270
 target_put_cmd_and_wait+0x64/0xb0 [target_core_mod]
 core_tmr_lun_reset+0x30/0xa0 [target_core_mod]
 target_tmr_work+0xc8/0x1b0 [target_core_mod]
 process_one_work+0x2d4/0x5d0
 worker_thread+0x78/0x6c0

To fix this, only add abort to tmr_list if it will be handled by target
core.

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Link: https://lore.kernel.org/r/20240111125941.8688-1-d.bogdanov@yadro.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:21:43 +01:00
..
accessibility
acpi ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events 2024-02-23 08:54:38 +01:00
amba amba: bus: fix refcount leak 2023-09-19 12:22:47 +02:00
android binder: signal epoll threads of self-work 2024-02-23 08:55:06 +01:00
ata ata: pata_isapnp: Add missing error check for devm_ioport_map() 2023-12-03 07:31:21 +01:00
atm atm: idt77252: fix a memleak in open_card_ubr0 2024-02-23 08:54:57 +01:00
auxdisplay
base PM: runtime: Have devm_pm_runtime_enable() handle pm_runtime_dont_use_autosuspend() 2024-02-23 08:55:15 +01:00
bcma
block block/rnbd-srv: Check for unlikely string overflow 2024-02-23 08:54:43 +01:00
bluetooth Bluetooth: qca: Set both WIDEBAND_SPEECH and LE_STATES quirks for QCA2066 2024-02-23 08:54:45 +01:00
bus bus: moxtet: Add spi device table 2024-02-23 08:55:10 +01:00
cdrom
char hwrng: core - Fix page fault dead lock on mmap-ed hwrng 2024-02-23 08:54:24 +01:00
clk clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks 2024-02-23 08:54:49 +01:00
clocksource clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware 2023-11-28 16:56:15 +00:00
comedi
connector
counter counter: microchip-tcb-capture: Fix the use of internal GCLK logic 2023-10-19 23:05:37 +02:00
cpufreq cpufreq: intel_pstate: Refine computation of P-state for given frequency 2024-02-23 08:54:35 +01:00
cpuidle powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-09-19 12:22:42 +02:00
crypto crypto: ccp - Fix null pointer dereference in __sev_platform_shutdown_locked 2024-02-23 08:55:08 +01:00
cxl cxl/mem: Fix shutdown order 2023-11-20 11:08:27 +01:00
dax dax/kmem: Pass valid argument to memory_group_register_static 2023-07-23 13:47:17 +02:00
dca
devfreq PM / devfreq: Synchronize devfreq_monitor_[start/stop] 2024-02-23 08:54:38 +01:00
dio
dma dmaengine: fsl-qdma: Fix a memory leak related to the queue command DMA 2024-02-23 08:54:56 +01:00
dma-buf dma-buf: add dma_fence_timestamp helper 2024-02-23 08:55:10 +01:00
edac EDAC/thunderx: Fix possible out-of-bounds string access 2024-01-25 14:52:32 -08:00
eisa
extcon extcon: usbc-tusb320: Convert to i2c's .probe_new() 2023-07-23 13:47:31 +02:00
firewire firewire: core: correct documentation of fw_csr_string() kernel API 2024-02-23 08:55:05 +01:00
firmware firmware: arm_scmi: Check mailbox/SMT channel for consistency 2024-02-23 08:54:32 +01:00
fpga fpga: bridge: fix kernel-doc parameter description 2023-05-11 23:00:31 +09:00
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-19 12:22:46 +02:00
gnss
gpio gpio: eic-sprd: Clear interrupt after set the interrupt type 2024-02-23 08:54:35 +01:00
gpu drm/msm/dsi: Enable runtime PM 2024-02-23 08:55:15 +01:00
greybus
hid fbdev: Rename pagelist to pagereflist for deferred I/O 2024-02-23 08:55:13 +01:00
hsi
hv Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs 2023-06-28 10:29:42 +02:00
hwmon hwmon: (coretemp) Fix bogus core_id to attr name mapping 2024-02-23 08:54:57 +01:00
hwspinlock
hwtracing coresight: etm4x: Fix width of CCITMIN field 2024-01-25 14:52:32 -08:00
i2c i2c: i801: Fix block process call transactions 2024-02-23 08:55:04 +01:00
i3c i3c: master: cdns: Update maximum prescaler value for i2c clock 2024-02-23 08:54:50 +01:00
idle
iio iio: accel: bma400: Fix a compilation problem 2024-02-23 08:55:07 +01:00
infiniband IB/ipoib: Fix mcast list locking 2024-02-23 08:54:48 +01:00
input Input: atkbd - skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID 2024-02-23 08:55:00 +01:00
interconnect interconnect: Treat xlate() returning NULL node as an error 2024-01-05 15:13:32 +01:00
iommu iommu/dma: Trace bounce buffer usage when mapping buffers 2024-01-25 14:52:49 -08:00
ipack
irqchip irqchip/gic-v3-its: Fix GICv4.1 VPE affinity update 2024-02-23 08:55:09 +01:00
isdn mISDN: Update parameter type of dsp_cmx_send() 2023-08-16 18:22:01 +02:00
leds leds: trigger: panic: Don't register panic notifier if creating the trigger failed 2024-02-23 08:54:49 +01:00
macintosh macintosh: via-pmu-led: requires ATA to be set 2023-05-11 23:00:34 +09:00
mailbox mailbox: arm_mhuv2: Fix a bug for mhuv2_sender_interrupt 2024-02-23 08:54:50 +01:00
mcb mcb: fix error handling for different scenarios when parsing 2023-11-28 16:56:31 +00:00
md dm: limit the number of targets and parameter size area 2024-02-23 08:55:14 +01:00
media media: Revert "media: rkisp1: Drop IRQF_SHARED" 2024-02-23 08:55:16 +01:00
memory memory: brcmstb_dpfe: fix testing array offset after use 2023-07-23 13:47:03 +02:00
memstick memstick r592: make memstick_debug_get_tpc_name() static 2023-07-23 13:46:52 +02:00
message scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition 2023-05-24 17:36:45 +01:00
mfd mfd: ti_am335x_tscadc: Fix TI SoC dependencies 2024-02-23 08:54:50 +01:00
misc misc: fastrpc: Mark all sessions as invalid in cb_remove 2024-02-23 08:55:06 +01:00
mmc mmc: slot-gpio: Allow non-sleeping GPIO ro 2024-02-23 08:55:08 +01:00
most
mtd mtd: Fix gluebi NULL pointer dereference caused by ftl notifier 2024-01-25 14:52:34 -08:00
mux
net net: bcmgenet: Fix EEE implementation 2024-02-23 08:55:15 +01:00
nfc nfcsim.c: Fix error checking for debugfs_create_dir 2023-06-28 10:29:51 +02:00
ntb ntb: Fix calculation ntb_transport_tx_free_entry() 2023-09-19 12:22:51 +02:00
nubus nubus: Partially revert proc_create_single_data() conversion 2023-07-05 18:25:05 +01:00
nvdimm nd_btt: Make BTT lanes preemptible 2023-11-20 11:08:22 +01:00
nvme nvmet-tcp: Fix the H2C expected PDU len calculation 2024-01-25 14:52:52 -08:00
nvmem nvmem: imx: correct nregs for i.MX6UL 2023-11-08 17:26:41 +01:00
of of: property: fix typo in io-channels 2024-02-23 08:55:10 +01:00
opp OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd() 2023-09-19 12:22:31 +02:00
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-06 13:18:15 +02:00
parport parport: parport_serial: Add Brainboxes device IDs and geometry 2024-01-25 14:52:31 -08:00
pci PCI: dwc: Fix a 64bit bug in dw_pcie_ep_raise_msix_irq() 2024-03-01 13:21:43 +01:00
pcmcia pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() 2023-11-20 11:08:27 +01:00
perf perf: hisi: Fix use-after-free when register pmu fails 2023-11-20 11:08:21 +01:00
phy phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP 2024-02-23 08:54:56 +01:00
pinctrl pinctrl: lochnagar: Don't build on MIPS 2024-01-25 14:52:27 -08:00
platform platform/x86: intel-vbtn: Fix missing tablet-mode-switch events 2024-01-25 14:52:29 -08:00
pnp PNP: ACPI: fix fortify warning 2024-02-23 08:54:38 +01:00
power power: supply: bq256xx: fix some problem in bq256xx_hw_init 2024-01-25 14:52:50 -08:00
powercap powercap: RAPL: Fix CONFIG_IOSF_MBI dependency 2023-07-23 13:46:46 +02:00
pps
ps3
ptp ptp: annotate data-race around q->head and q->tail 2023-11-28 16:56:23 +00:00
pwm pwm: jz4740: Don't use dev_err_probe() in .request() 2024-01-25 14:52:48 -08:00
rapidio
ras
regulator regulator: core: Only increment use_count when enable_count changes 2024-02-23 08:54:37 +01:00
remoteproc remoteproc: stm32_rproc: Add mutex protection for workqueue 2023-05-24 17:36:44 +01:00
reset reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning 2024-01-25 14:52:30 -08:00
rpmsg rpmsg: virtio: Free driver_override when rpmsg_remove() 2024-02-23 08:54:24 +01:00
rtc rtc: Adjust failure return code for cmos_set_alarm() 2024-02-23 08:54:26 +01:00
s390 s390/qeth: Fix potential loss of L3-IP@ in case of network issues 2024-02-23 08:55:09 +01:00
sbus
scsi scsi: Revert "scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock" 2024-02-23 08:55:05 +01:00
sh
siox
slimbus
soc soc: qcom: llcc: Fix dis_cap_alloc and retain_on_pc configuration 2024-01-25 14:52:39 -08:00
soundwire soundwire: stream: fix NULL pointer dereference for multi_link 2023-12-20 15:17:41 +01:00
spi spi: ppc4xx: Drop write-only variable 2024-02-23 08:55:02 +01:00
spmi spmi: Add a check for remove callback when removing a SPMI driver 2023-05-11 23:00:34 +09:00
ssb
staging staging: fbtft: core: set smem_len before fb_deferred_io_init call 2024-02-23 08:55:15 +01:00
target scsi: target: core: Add TMF to tmr_list handling 2024-03-01 13:21:43 +01:00
tc
tee tee: optee: Fix supplicant based device enumeration 2023-12-13 18:36:38 +01:00
thermal thermal: core: prevent potential string overflow 2023-11-20 11:08:15 +01:00
thunderbolt thunderbolt: Check that lane 1 is in CL0 before enabling lane bonding 2023-10-19 23:05:36 +02:00
tty serial: 8250_exar: Set missing rs485_supported flag 2024-02-23 08:55:12 +01:00
uio uio: Fix use-after-free in uio_open 2024-01-25 14:52:31 -08:00
usb usb: dwc3: gadget: Ignore End Transfer delay on teardown 2024-02-23 08:55:16 +01:00
vdpa vdpa/mlx5: preserve CVQ vringh index 2023-12-13 18:36:31 +01:00
vfio vfio/type1: fix cap_migration information leak 2023-09-19 12:22:41 +02:00
vhost vhost: use kzalloc() instead of kmalloc() followed by memset() 2024-02-23 08:55:00 +01:00
video fbdev: flush deferred IO before closing 2024-02-23 08:55:13 +01:00
virt
virtio virtio-mmio: fix memory leak of vm_dev 2023-11-08 17:26:36 +01:00
visorbus
vlynq
vme
w1 w1: fix loop in w1_fini() 2023-07-23 13:47:20 +02:00
watchdog watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786 2024-02-23 08:54:49 +01:00
xen xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import 2024-02-23 08:54:50 +01:00
zorro
Kconfig
Makefile