linux-stable/drivers/misc
Wei Yongjun 770e92dbc9 misc: lattice-ecp3-config: Fix task hung when firmware load failed
[ Upstream commit fcee5ce50b ]

When firmware load failed, kernel report task hung as follows:

INFO: task xrun:5191 blocked for more than 147 seconds.
      Tainted: G        W         5.16.0-rc5-next-20211220+ #11
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:xrun            state:D stack:    0 pid: 5191 ppid:   270 flags:0x00000004
Call Trace:
 __schedule+0xc12/0x4b50 kernel/sched/core.c:4986
 schedule+0xd7/0x260 kernel/sched/core.c:6369 (discriminator 1)
 schedule_timeout+0x7aa/0xa80 kernel/time/timer.c:1857
 wait_for_completion+0x181/0x290 kernel/sched/completion.c:85
 lattice_ecp3_remove+0x32/0x40 drivers/misc/lattice-ecp3-config.c:221
 spi_remove+0x72/0xb0 drivers/spi/spi.c:409

lattice_ecp3_remove() wait for signals from firmware loading, but when
load failed, firmware_load() does not send this signal. This cause
device remove hung. Fix it by sending signal even if load failed.

Fixes: 781551df57 ("misc: Add Lattice ECP3 FPGA configuration via SPI")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20211228125522.3122284-1-weiyongjun1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 09:19:39 +01:00
..
altera-stapl
c2port
cardreader misc: alcor_pci: fix inverted branch condition 2021-07-20 16:10:53 +02:00
cb710 cb710: avoid NULL pointer subtraction 2021-10-20 11:40:13 +02:00
cxl cxl: Rework error message for incompatible slots 2020-11-01 12:01:05 +01:00
echo
eeprom eeprom: idt_89hpesx: Restore printing the unsupported fwnode name 2021-07-14 16:53:43 +02:00
genwqe
habanalabs habanalabs: Call put_pid() when releasing control device 2021-03-30 14:35:22 +02:00
ibmasm misc/libmasm/module: Fix two use after free in ibmasm_init_one 2021-07-20 16:10:41 +02:00
lis3lv02d platform/x86: hp_accel: Avoid invoking _INI to speed up resume 2021-06-03 08:59:08 +02:00
lkdtm lkdtm: Fix content of section containing lkdtm_rodata_do_nothing() 2022-01-27 09:19:28 +01:00
mei mei: me: add Ice Lake-N device id. 2021-10-20 11:40:13 +02:00
mic
ocxl
sgi-gru
sgi-xp
ti-st
vmw_vmci VMCI: fix NULL pointer dereference when unmapping queue pair 2021-09-22 12:26:21 +02:00
Kconfig
Makefile
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c
atmel_tclib.c
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c
fastrpc.c misc: fastrpc: fix improper packet size calculation 2021-12-14 14:49:06 +01:00
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c ics932s401: fix broken handling of errors when word reading fails 2021-05-26 12:05:20 +02:00
isl29003.c
isl29020.c
kgdbts.c kgdb: fix gcc-11 warnings harder 2021-06-03 08:59:03 +02:00
lattice-ecp3-config.c misc: lattice-ecp3-config: Fix task hung when firmware load failed 2022-01-27 09:19:39 +01:00
pch_phub.c
pci_endpoint_test.c
phantom.c
pti.c
pvpanic.c misc/pvpanic: Export module FDT device table 2021-03-17 17:03:52 +01:00
qcom-coincell.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c
xilinx_sdfec.c